{"id":312198,"date":"2020-10-28T21:00:30","date_gmt":"2020-10-28T21:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312198"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312198","title":{"rendered":"\u0421\u0442\u0430\u0440\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Excel \u043d\u0430 C#"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0432\u0441\u0442\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0442\u0447\u0435\u0442\u044b, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 xls\/x \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u0432 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0432\u0438\u0434\u0435, Excel \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c. \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0432 \u043a\u0443\u043f\u0435 \u0441 \u0435\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e&#8230; \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0430\u0432\u0441\u043a\u0438\u0434\u043a\u0443 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bf\/0f9\/9dd\/1bf0f99dd93fcebab5465b0c2aa9966f\" width=\"833\" height=\"200\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u043c\u043d\u043e\u0433\u0438\u0445<strong> Excel \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong> \u0441 \u0447\u0435\u043c-\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u043c, \u043d\u0435\u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043b\u0438\u0432\u044b\u043c \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b &#8212; \u043e\u0431\u044b\u0447\u043d\u044b\u0435 C# \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 .xls(Excel Binary File Format) \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u0438 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e .xlsx(Excel Workbook), \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Office Open XML. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 .zip \u0430\u0440\u0445\u0438\u0432 \u0441 XML \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u044f \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0447\u0442\u043e \u0432\u0430\u043c \u044d\u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:)<\/p>\n<p>\u041d\u0430 github, \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <strong>\u0440\u044f\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/strong>, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e. \u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f EPPlus. \u0414\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043e\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e Excel, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e EPPlus. \u0412\u0435\u0440\u0441\u0438\u044f 4 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 5\u2010\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a,<strong> \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c<\/strong>, \u043f\u0440\u043e\u0434\u0443\u043a\u0442-\u043c\u044d\u043d\u0435\u0434\u0436\u0435\u0440\u0443 \u0443\u0434\u0430\u0440\u0438\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0435\u043a\u0438\u0439 \u043e\u0442\u0447\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435&nbsp;Excel \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 100500%. \u041f\u0440\u043e\u0434\u0436\u0435\u0442-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u0438\u043b\u043b\u0435\u0440-\u0444\u0438\u0447\u0443 \u043a\u0430\u043a \u0445\u043e\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u2014 \u0432\u0435\u0434\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0433\u043e \u043d\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/936\/82d\/b03\/93682db039753d8e81e8014a84099369\" width=\"668\" height=\"547\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435, \u043e\u0442\u0447\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0442\u044b.                 \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e backend-\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e id \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 id \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u0430\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442\u0447\u0435\u0442\u0430.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u0434\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0444\u0435\u043d\u043e\u043c\u0435\u043d\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u044b\u043c&nbsp;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c &#8212; &#171;\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c&nbsp;excel \u043e\u0442\u0447\u0435\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MarketReport&#187;. \u0427\u0442\u043e \u0436, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u2014 <strong>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440<\/strong> \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/538\/71c\/52b\/53871c52ba2b3b520c4dbf2e3ef8ecd1.png\" width=\"1427\" height=\"456\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c EPPlus \u0432\u0435\u0440\u0441\u0438\u0438 4.5.3.3 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea4\/5db\/bd9\/ea45dbbd9ed019a4ac84d0b210537046\" width=\"677\" height=\"242\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0435\u0440\u0434\u0446\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u043e\u0434  Generate. ExcelPackage \u044d\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f&nbsp;\u0441 \u043d\u0438\u043c. \u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430. <\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/506\/922\/e32\/506922e325b9a5818ccc1be1552dceb9\" width=\"691\" height=\"218\"><figcaption><\/figcaption><\/figure>\n<p>                                                                                                  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 main \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 Excel \u0444\u0430\u0439\u043b\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 <strong>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/strong>, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c exception:<code>InvalidOperationException: The workbook must contain at least one worksheet<\/code><\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0435, \u0432\u0441\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e:<\/p>\n<pre><code class=\"cs\">var sheet = package.Workbook.Worksheets     \t\t.Add(\"Market Report\");<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0438&#8230; \u0432\u043e\u0442 \u043e\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/strong> \u0438, \u0445\u043e\u0442\u044f \u0442\u0430\u043c \u0435\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442, \u043e\u043d \u0443\u0436\u0435 \u0432\u0435\u0441\u0438\u0442 2,5KB &#8212; \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Excel \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0432\u0441\u0435 \u0438\u0434\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0448\u0430\u043f\u043a\u0443. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 Cells \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0434\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0442\u0430\u043a \u0438 \u043f\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c\u0443 \u0432\u0441\u0435\u043c <strong>\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e-\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u043a\u043e\u0434\u0443<\/strong>:<\/p>\n<pre><code class=\"cs\">sheet.Cells[\"B2\"].Value = \"Company:\"; sheet.Cells[2, 3].Value = report.Company.Name;<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0432\u043e\u0434\u0430 \u0448\u0430\u043f\u043a\u0438.<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">sheet.Cells[\"B2\"].Value = \"Company:\"; sheet.Cells[2, 3].Value = report.Company.Name; sheet.Cells[\"B3\"].Value = \"Location:\"; sheet.Cells[\"C3\"].Value = $\"{report.Company.Address}, \" +   \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.City}, \" +                             \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.Country}\"; sheet.Cells[\"B4\"].Value = \"Sector:\"; sheet.Cells[\"C4\"].Value = report.Company.Sector; sheet.Cells[\"B5\"].Value = report.Company.Description;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0448\u0430\u043f\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0446\u0438\u043a\u043b \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 History:<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8, 4].LoadFromArrays(new object[][]{ new []{\"Capitalization\", \"SharePrice\", \"Date\"} }); var row = 9; var column = 2; foreach (var item in report.History) {   sheet.Cells[row, column].Value = item.Capitalization;   sheet.Cells[row, column + 1].Value = item.SharePrice;   sheet.Cells[row, column + 2].Value = item.Date;       row++; }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <strong>LoadFromArrays<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u044f\u0447\u0435\u0435\u043a \u0440\u0432\u0430\u043d\u044b\u043c(\u0437\u0443\u0431\u0447\u0430\u0442\u044b\u043c) \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 object \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u0447\u0442\u043e EPPlus \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ToString, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0438. <\/p>\n<h2>\u0421\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0442\u043e \u0432\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u0434\u0430\u0442\u044c   <strong>\u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c<\/strong>. <\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d07\/a3f\/cec\/d07a3fcec4949579aea07ec7407f0cda.png\" width=\"510\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0448\u0430\u043f\u043a\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446&#8230; \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u044f\u0448\u0435\u0442, \u0434\u0430\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438&nbsp;\u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0430 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f &#171;\u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443&#187; &#8212; \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a.<\/p>\n<p>\u0414\u0430, \u043d\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0441\u0442\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0439\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 <s>\u0433\u043e\u0434\u0430<\/s> \u043a\u043e\u0434\u0430, \u0447\u0435\u043c \u043d\u0430 \u0441\u0430\u043c \u0432\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0442\u043e\u0433\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u043a\u0430\u0448\u0430 \u0438\u0437 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u043e\u043c\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438&#8230; \u043d\u043e, \u043c\u044b \u0436\u0435<strong> backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438<\/strong>, \u0442\u0430\u043a \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0432\u0435\u0440\u0441\u0442\u0430\u0435\u043c Excel Sheet!<\/p>\n<h4>\u0420\u0430\u0437\u043c\u0435\u0440 \u044f\u0447\u0435\u0435\u043a<\/h4>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c <strong>\u0430\u0432\u0442\u043e\u0444\u0438\u0442 <\/strong>\u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439. \u0410 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u2014 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u0448\u0430\u043f\u043a\u0435 \u0443 \u044f\u0447\u0435\u0435\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u0444\u0438\u0442, \u0430 \u0443 \u044f\u0447\u0435\u0435\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u2014 \u0442\u043e\u0436\u0435 \u0430\u0432\u0442\u043e\u0444\u0438\u0442. \u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u043f\u043e\u0434\u0432\u043e\u0445?<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438 Excel, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u044f\u0447\u0435\u0435\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438 \u0430\u0432\u0442\u043e\u0444\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, <strong>\u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438<\/strong> \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u0442\u0430\u043a \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c&#8230; \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u0441\u044c, \u0442\u043e \u0432\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"cs\">sheet.Cells[1, 1, row, column + 2].AutoFitColumns(); sheet.Column(2).Width = 14; sheet.Column(3).Width = 12;<\/code><\/pre>\n<h4>\u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041a\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438, \u043e\u043d \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>\u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e<\/strong> Style. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 3-\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430. \u042d\u0442\u043e \u0437\u0432\u043e\u043d\u043e\u0447\u0435\u043a \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0432 \u043f\u043e\u0437\u0436\u0435&#8230;<\/p>\n<pre><code class=\"cs\">sheet.Cells[9, 4, 9 + report.History.Length, 4].Style.Numberformat.Format = \"yyyy\"; sheet.Cells[9, 2, 9 + report.History.Length, 2].Style.Numberformat.Format =  \"### ### ### ##0\";<\/code><\/pre>\n<h4>\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u044f\u0447\u0435\u0439\u043a\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 <strong>\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435<\/strong>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f EPPlus, \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435\u043a\u0438\u0439 ExcelRange, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u044f\u0447\u0435\u0435\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0441\u043e \u0432\u0441\u0435\u0433\u043e 1 \u044f\u0447\u0435\u0439\u043a\u043e\u0439.<\/p>\n<pre><code class=\"cs\">sheet.Column(2).Style.HorizontalAlignment = ExcelHorizontalAlignment.Left; sheet.Cells[8, 3, 8 + report.History.Length, 3].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;<\/code><\/pre>\n<h4>\u0421\u0442\u0438\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0430<\/h4>\n<p> \u0422\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Style.Font, \u043a\u0441\u0442\u0430\u0442\u0438, \u0437\u0434\u0435\u0441\u044c, \u043d\u0430 2-\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u043c\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c <strong>\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <\/strong>\u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u0435\u0433\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 Excel:<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8, 4].Style.Font.Bold = true; sheet.Cells[\"B2:C4\"].Style.Font.Bold = true;<\/code><\/pre>\n<h4>\u0413\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u0417\u0430\u0434\u0430\u0435\u043c \u0441\u0442\u0438\u043b\u044c \u043b\u0438\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0435 \u0442\u043e\u043b\u0449\u0438\u043d\u0443. \u041a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u043e\u0442 \u043a\u043e\u043b-\u0432\u0430 <strong>\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/strong> \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430 \u0443\u0436\u0435 \u0440\u044f\u0431\u0438\u0442 \u0432 \u0433\u043b\u0430\u0437\u0430\u0445, \u043d\u043e \u043c\u044b \u0443\u0436\u0435 \u043d\u0430 \u0444\u0438\u043d\u0438\u0448\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439&#8230; \u043d\u0435 \u0442\u0430\u043a \u043b\u0438?<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8 + report.History.Length, 4].Style.Border.BorderAround(ExcelBorderStyle.Double); sheet.Cells[8, 2, 8, 4].Style.Border.Bottom.Style = ExcelBorderStyle.Thin;<\/code><\/pre>\n<h4>\u0413\u0440\u0430\u0444\u0438\u043a<\/h4>\n<p>&#171;\u041d\u0443 \u0447\u0442\u043e \u0437\u0430 \u043e\u0442\u0447\u0435\u0442 \u0431\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0432\u0435\u0440\u043d\u043e, <strong>\u041a\u0430\u0440\u043b<\/strong>?&#187; &#8212; \u043b\u043e\u0432\u043a\u043e \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0438 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0422\u0417 \u0430 \u043d\u0430 \u0447\u0430\u0441\u0430\u0445 \u0443\u0436\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 9-\u0433\u043e&#8230;<\/p>\n<p> \u0425\u043e\u0442\u044f \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0430\u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u043c\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c, EPPlus \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c <strong>\u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/strong>, \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0440\u043e\u0441\u0442 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cs\">var capitalizationChart = sheet.Drawings.AddChart(\"FindingsChart\", OfficeOpenXml.Drawing.Chart.eChartType.Line); capitalizationChart.Title.Text = \"Capitalization\"; capitalizationChart.SetPosition(7, 0, 5, 0); capitalizationChart.SetSize(800, 400); var capitalizationData = (ExcelChartSerie)(capitalizationChart.Series.Add(sheet.Cells[\"B9:B28\"], sheet.Cells[\"D9:D28\"])); capitalizationData.Header = report.Company.Currency;<\/code><\/pre>\n<p>\u0415\u0449\u0435, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <strong>\u043e\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>:<\/p>\n<pre><code class=\"cs\">sheet.Protection.IsProtected = true;<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<details class=\"spoiler\">\n<summary>\u041e \u0447\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 Generate?<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">public byte[] Generate(MarketReport report) {       var package = new ExcelPackage();          var sheet = package.Workbook.Worksheets             \t.Add(\"Market Report\");            sheet.Cells[\"B2\"].Value = \"Company:\";       sheet.Cells[2, 3].Value = report.Company.Name;       sheet.Cells[\"B3\"].Value = \"Location:\";       sheet.Cells[\"C3\"].Value = $\"{report.Company.Address}, \" +     \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.City}, \" +                                  \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.Country}\";       sheet.Cells[\"B4\"].Value = \"Sector:\";       sheet.Cells[\"C4\"].Value = report.Company.Sector;       sheet.Cells[\"B5\"].Value = report.Company.Description;          sheet.Cells[8, 2, 8, 4].LoadFromArrays(new object[][]{ new []{\"Capitalization\", \"SharePrice\", \"Date\"} });       var row = 9;       var column = 2;       foreach (var item in report.History)       {             \tsheet.Cells[row, column].Value = item.Capitalization;            \t\tsheet.Cells[row, column + 1].Value = item.SharePrice;            \t\tsheet.Cells[row, column + 2].Value = item.Date;             \trow++;       }          sheet.Cells[1, 1, row, column + 2].AutoFitColumns();       sheet.Column(2).Width = 14;       sheet.Column(3).Width = 12;              sheet.Cells[9, 4, 9+ report.History.Length, 4].Style.Numberformat.Format = \"yyyy\";       sheet.Cells[9, 2, 9+ report.History.Length, 2].Style.Numberformat.Format =  \"### ### ### ##0\";          sheet.Column(2).Style.HorizontalAlignment = ExcelHorizontalAlignment.Left;       sheet.Cells[8, 3, 8 + report.History.Length, 3].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;       sheet.Column(4).Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;          sheet.Cells[8, 2, 8, 4].Style.Font.Bold = true;       sheet.Cells[\"B2:C4\"].Style.Font.Bold = true;      sheet.Cells[8, 2, 8 + report.History.Length, 4].Style.Border.BorderAround(ExcelBorderStyle.Double);       sheet.Cells[8, 2, 8, 4].Style.Border.Bottom.Style = ExcelBorderStyle.Thin;           var capitalizationChart = sheet.Drawings.AddChart(\"FindingsChart\", OfficeOpenXml.Drawing.Chart.eChartType.Line);       capitalizationChart.Title.Text = \"Capitalization\";       capitalizationChart.SetPosition(7, 0, 5, 0);       capitalizationChart.SetSize(800, 400);       var capitalizationData = (ExcelChartSerie)(capitalizationChart.Series.Add(sheet.Cells[\"B9:B28\"], sheet.Cells[\"D9:D28\"]));       capitalizationData.Header = report.Company.Currency;             sheet.Protection.IsProtected = true;          return package.GetAsByteArray(); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b <strong>\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c<\/strong> \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 Excel \u043e\u0442\u0447\u0435\u0442, \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043e \u0441\u0442\u0438\u043b\u044f\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0430\u0440\u0443 \u043f\u043e\u043f\u0443\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u044e&nbsp;\u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u043e, <strong>\u0437\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434<\/strong>, \u044f \u0431\u044b \u0441 \u044d\u0442\u0438\u043c \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u043b&#8230; \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0430\u0431\u0435\u0440\u0435\u0442 1+ \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432, \u0442\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044e&nbsp;\u043e\u0442 \u043b\u043e\u0433\u0438\u043a\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0434 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u0434 \u0431\u043e\u043b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/525492\/\"> https:\/\/habr.com\/ru\/post\/525492\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0432\u0441\u0442\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0442\u0447\u0435\u0442\u044b, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 xls\/x \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u0432 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0432\u0438\u0434\u0435, Excel \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c. \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u0432 \u043a\u0443\u043f\u0435 \u0441 \u0435\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e&#8230; \u0442\u0440\u0443\u0434\u043d\u043e \u043d\u0430\u0432\u0441\u043a\u0438\u0434\u043a\u0443 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0443 \u043c\u043d\u043e\u0433\u0438\u0445<strong> Excel \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong> \u0441 \u0447\u0435\u043c-\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u044b\u043c, \u043d\u0435\u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043b\u0438\u0432\u044b\u043c \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b &#8212; \u043e\u0431\u044b\u0447\u043d\u044b\u0435 C# \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 .xls(Excel Binary File Format) \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u0438 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e .xlsx(Excel Workbook), \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Office Open XML. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 .zip \u0430\u0440\u0445\u0438\u0432 \u0441 XML \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u044f \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0447\u0442\u043e \u0432\u0430\u043c \u044d\u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:)<\/p>\n<p>\u041d\u0430 github, \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <strong>\u0440\u044f\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/strong>, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e. \u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f EPPlus. \u0414\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043e\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e Excel, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e EPPlus. \u0412\u0435\u0440\u0441\u0438\u044f 4 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 5\u2010\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a,<strong> \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c<\/strong>, \u043f\u0440\u043e\u0434\u0443\u043a\u0442-\u043c\u044d\u043d\u0435\u0434\u0436\u0435\u0440\u0443 \u0443\u0434\u0430\u0440\u0438\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0435\u043a\u0438\u0439 \u043e\u0442\u0447\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435&nbsp;Excel \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043a\u043e\u043b-\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 100500%. \u041f\u0440\u043e\u0434\u0436\u0435\u0442-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0440\u0435\u0448\u0430\u0435\u0442 \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u0438\u043b\u043b\u0435\u0440-\u0444\u0438\u0447\u0443 \u043a\u0430\u043a \u0445\u043e\u0442\u0444\u0438\u043a\u0441 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u2014 \u0432\u0435\u0434\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0433\u043e \u043d\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435, \u043e\u0442\u0447\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0442\u044b.                 \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e backend-\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e id \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 id \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u0430\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442\u0447\u0435\u0442\u0430.<\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u0434\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0444\u0435\u043d\u043e\u043c\u0435\u043d\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u044b\u043c&nbsp;\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c &#8212; &#171;\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c&nbsp;excel \u043e\u0442\u0447\u0435\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MarketReport&#187;. \u0427\u0442\u043e \u0436, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u2014 <strong>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440<\/strong> \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c EPPlus \u0432\u0435\u0440\u0441\u0438\u0438 4.5.3.3 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0435\u0440\u0434\u0446\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u0442\u043e\u0434  Generate. ExcelPackage \u044d\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f&nbsp;\u0441 \u043d\u0438\u043c. \u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430. <\/p>\n<figure class=\"float full-width\"><figcaption><\/figcaption><\/figure>\n<p>                                                                                                  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 main \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 Excel \u0444\u0430\u0439\u043b\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 <strong>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/strong>, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c exception:<code>InvalidOperationException: The workbook must contain at least one worksheet<\/code><\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, Excel \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0435, \u0432\u0441\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e:<\/p>\n<pre><code class=\"cs\">var sheet = package.Workbook.Worksheets     \t\t.Add(\"Market Report\");<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0438&#8230; \u0432\u043e\u0442 \u043e\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/strong> \u0438, \u0445\u043e\u0442\u044f \u0442\u0430\u043c \u0435\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442, \u043e\u043d \u0443\u0436\u0435 \u0432\u0435\u0441\u0438\u0442 2,5KB &#8212; \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Excel \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0432\u0441\u0435 \u0438\u0434\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0448\u0430\u043f\u043a\u0443. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 Cells \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0434\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0447\u0435\u0440\u0435\u0437 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0442\u0430\u043a \u0438 \u043f\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c\u0443 \u0432\u0441\u0435\u043c <strong>\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e-\u0447\u0438\u0441\u043b\u043e\u0432\u043e\u043c\u0443 \u043a\u043e\u0434\u0443<\/strong>:<\/p>\n<pre><code class=\"cs\">sheet.Cells[\"B2\"].Value = \"Company:\"; sheet.Cells[2, 3].Value = report.Company.Name;<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0432\u043e\u0434\u0430 \u0448\u0430\u043f\u043a\u0438.<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">sheet.Cells[\"B2\"].Value = \"Company:\"; sheet.Cells[2, 3].Value = report.Company.Name; sheet.Cells[\"B3\"].Value = \"Location:\"; sheet.Cells[\"C3\"].Value = $\"{report.Company.Address}, \" +   \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.City}, \" +                             \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.Country}\"; sheet.Cells[\"B4\"].Value = \"Sector:\"; sheet.Cells[\"C4\"].Value = report.Company.Sector; sheet.Cells[\"B5\"].Value = report.Company.Description;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0448\u0430\u043f\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0446\u0438\u043a\u043b \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 History:<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8, 4].LoadFromArrays(new object[][]{ new []{\"Capitalization\", \"SharePrice\", \"Date\"} }); var row = 9; var column = 2; foreach (var item in report.History) {   sheet.Cells[row, column].Value = item.Capitalization;   sheet.Cells[row, column + 1].Value = item.SharePrice;   sheet.Cells[row, column + 2].Value = item.Date;       row++; }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <strong>LoadFromArrays<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u044f\u0447\u0435\u0435\u043a \u0440\u0432\u0430\u043d\u044b\u043c(\u0437\u0443\u0431\u0447\u0430\u0442\u044b\u043c) \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 object \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c \u0447\u0442\u043e EPPlus \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ToString, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u044f\u0447\u0435\u0439\u043a\u0438. <\/p>\n<h2>\u0421\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0442\u043e \u0432\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u0434\u0430\u0442\u044c   <strong>\u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0432 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 \u0432\u0435\u0447\u0435\u0440\u043e\u043c<\/strong>. <\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0448\u0430\u043f\u043a\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446&#8230; \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u044f\u0448\u0435\u0442, \u0434\u0430\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438&nbsp;\u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0430 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f &#171;\u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443&#187; &#8212; \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a.<\/p>\n<p>\u0414\u0430, \u043d\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0441\u0442\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0439\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 <s>\u0433\u043e\u0434\u0430<\/s> \u043a\u043e\u0434\u0430, \u0447\u0435\u043c \u043d\u0430 \u0441\u0430\u043c \u0432\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0442\u043e\u0433\u0435, \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u043a\u0430\u0448\u0430 \u0438\u0437 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u043e\u043c\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u0445 \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438&#8230; \u043d\u043e, \u043c\u044b \u0436\u0435<strong> backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438<\/strong>, \u0442\u0430\u043a \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0432\u0435\u0440\u0441\u0442\u0430\u0435\u043c Excel Sheet!<\/p>\n<h4>\u0420\u0430\u0437\u043c\u0435\u0440 \u044f\u0447\u0435\u0435\u043a<\/h4>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c <strong>\u0430\u0432\u0442\u043e\u0444\u0438\u0442 <\/strong>\u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0435\u0439. \u0410 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u2014 \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u0448\u0430\u043f\u043a\u0435 \u0443 \u044f\u0447\u0435\u0435\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u0444\u0438\u0442, \u0430 \u0443 \u044f\u0447\u0435\u0435\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u2014 \u0442\u043e\u0436\u0435 \u0430\u0432\u0442\u043e\u0444\u0438\u0442. \u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u043f\u043e\u0434\u0432\u043e\u0445?<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438 Excel, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u044f\u0447\u0435\u0435\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438 \u0430\u0432\u0442\u043e\u0444\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u0448\u0438\u0440\u043e\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, <strong>\u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438<\/strong> \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u0442\u0430\u043a \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c&#8230; \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u0441\u044c, \u0442\u043e \u0432\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"cs\">sheet.Cells[1, 1, row, column + 2].AutoFitColumns(); sheet.Column(2).Width = 14; sheet.Column(3).Width = 12;<\/code><\/pre>\n<h4>\u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041a\u0430\u043a \u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438, \u043e\u043d \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>\u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e<\/strong> Style. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 3-\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430. \u042d\u0442\u043e \u0437\u0432\u043e\u043d\u043e\u0447\u0435\u043a \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0432 \u043f\u043e\u0437\u0436\u0435&#8230;<\/p>\n<pre><code class=\"cs\">sheet.Cells[9, 4, 9 + report.History.Length, 4].Style.Numberformat.Format = \"yyyy\"; sheet.Cells[9, 2, 9 + report.History.Length, 2].Style.Numberformat.Format =  \"### ### ### ##0\";<\/code><\/pre>\n<h4>\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>\u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u044f\u0447\u0435\u0439\u043a\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 <strong>\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435<\/strong>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f EPPlus, \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435\u043a\u0438\u0439 ExcelRange, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u044f\u0447\u0435\u0435\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0441\u043e \u0432\u0441\u0435\u0433\u043e 1 \u044f\u0447\u0435\u0439\u043a\u043e\u0439.<\/p>\n<pre><code class=\"cs\">sheet.Column(2).Style.HorizontalAlignment = ExcelHorizontalAlignment.Left; sheet.Cells[8, 3, 8 + report.History.Length, 3].Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;<\/code><\/pre>\n<h4>\u0421\u0442\u0438\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0430<\/h4>\n<p> \u0422\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Style.Font, \u043a\u0441\u0442\u0430\u0442\u0438, \u0437\u0434\u0435\u0441\u044c, \u043d\u0430 2-\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435, \u043c\u044b \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c <strong>\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <\/strong>\u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u0435\u0433\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 Excel:<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8, 4].Style.Font.Bold = true; sheet.Cells[\"B2:C4\"].Style.Font.Bold = true;<\/code><\/pre>\n<h4>\u0413\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u0417\u0430\u0434\u0430\u0435\u043c \u0441\u0442\u0438\u043b\u044c \u043b\u0438\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0435 \u0442\u043e\u043b\u0449\u0438\u043d\u0443. \u041a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u043e\u0442 \u043a\u043e\u043b-\u0432\u0430 <strong>\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/strong> \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430 \u0443\u0436\u0435 \u0440\u044f\u0431\u0438\u0442 \u0432 \u0433\u043b\u0430\u0437\u0430\u0445, \u043d\u043e \u043c\u044b \u0443\u0436\u0435 \u043d\u0430 \u0444\u0438\u043d\u0438\u0448\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439&#8230; \u043d\u0435 \u0442\u0430\u043a \u043b\u0438?<\/p>\n<pre><code class=\"cs\">sheet.Cells[8, 2, 8 + report.History.Length, 4].Style.Border.BorderAround(ExcelBorderStyle.Double); sheet.Cells[8, 2, 8, 4].Style.Border.Bottom.Style = ExcelBorderStyle.Thin;<\/code><\/pre>\n<h4>\u0413\u0440\u0430\u0444\u0438\u043a<\/h4>\n<p>&#171;\u041d\u0443 \u0447\u0442\u043e \u0437\u0430 \u043e\u0442\u0447\u0435\u0442 \u0431\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0432\u0435\u0440\u043d\u043e, <strong>\u041a\u0430\u0440\u043b<\/strong>?&#187; &#8212; \u043b\u043e\u0432\u043a\u043e \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0438 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0422\u0417 \u0430 \u043d\u0430 \u0447\u0430\u0441\u0430\u0445 \u0443\u0436\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 9-\u0433\u043e&#8230;<\/p>\n<p> \u0425\u043e\u0442\u044f \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u0430\u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u043c\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c, EPPlus \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 API. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c <strong>\u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/strong>, \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0440\u043e\u0441\u0442 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cs\">var capitalizationChart = sheet.Drawings.AddChart(\"FindingsChart\", OfficeOpenXml.Drawing.Chart.eChartType.Line); capitalizationChart.Title.Text = \"Capitalization\"; capitalizationChart.SetPosition(7, 0, 5, 0); capitalizationChart.SetSize(800, 400); var capitalizationData = (ExcelChartSerie)(capitalizationChart.Series.Add(sheet.Cells[\"B9:B28\"], sheet.Cells[\"D9:D28\"])); capitalizationData.Header = report.Company.Currency;<\/code><\/pre>\n<p>\u0415\u0449\u0435, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <strong>\u043e\u0442 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>:<\/p>\n<pre><code class=\"cs\">sheet.Protection.IsProtected = true;<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<details class=\"spoiler\">\n<summary>\u041e \u0447\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 Generate?<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cs\">public byte[] Generate(MarketReport report) {       var package = new ExcelPackage();          var sheet = package.Workbook.Worksheets             \t.Add(\"Market Report\");            sheet.Cells[\"B2\"].Value = \"Company:\";       sheet.Cells[2, 3].Value = report.Company.Name;       sheet.Cells[\"B3\"].Value = \"Location:\";       sheet.Cells[\"C3\"].Value = $\"{report.Company.Address}, \" +     \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.City}, \" +                                  \t\t\t\t\t\t\t\t\t\t\t\t$\"{report.Company.Country}\";       sheet.Cells[\"B4\"].Value = \"Sector:\";       sheet.Cells[\"C4\"].Value = report.Company.Sector;       sheet.Cells[\"B5\"].Value = report.Company.Description;          sheet.Cells[8, 2, 8, 4].LoadFromArrays(new object[][]{ new []{\"Capitalization\", \"SharePrice\", \"Date\"} });       var row = 9;       var column = 2;       foreach (var item in report.History)       {             \tsheet.Cells[row, column].Value = item.Capitalization;            \t\tsheet.Cells[row, column + 1].Value = item.SharePrice;            \t\tsheet.Cells[row, column + 2].Value = item.Date;             \trow++;       }          sheet.Cells[1, 1, row, column + 2].AutoFitColumns();       sheet.Column(2).Width = 14;       sheet.Column(3).Width = 12;              sheet.Cells[9, 4, 9+ report.History.Length, 4].Style.Numberformat.Format = \"yyyy\";       sheet.Cells[9, 2, 9+ report.History.Length,<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312198","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312198"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312198\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}