epplus

How can I give line break in excel epplus c#

坚强是说给别人听的谎言 提交于 2020-08-24 05:09:11
问题 I am using Epplus library to convert dataTable in Excel. I am using a textarea in my front end site. In which a line break is also there. But, the problem is when I convert this file to Excel, text shows in one line not with a line break. How can I add a line break in Excel Epplus. I am using the following script: using (ExcelPackage pck = new ExcelPackage(newFile)) { ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Accounts"); ws.Cells["A1"].LoadFromDataTable(dataTable, true); pck.Save(); }

abp框架Excel导出——基于vue

久未见 提交于 2020-08-13 07:17:42
abp框架Excel导出——基于vue 目录 abp框架Excel导出——基于vue 1.技术栈 1.1 前端采用vue,官方提供 1.2 后台是abp——aspnetboilerplate 2. Excel导出需求 3. 升级日志Excel导出 4. 技术实现方案 4.1 后台 4.1.1 EPPlus导出静态方法 4.1.2 生成升级日志列表 4.1.3 将升级日志列表放到Excel导出静态方法中去 4.1.4 abp框架中前后端分离模式文件流传输 4.2 前端 4.2.1 vuex的action中添加请求方法 4.2.2 upgradeLog.vue升级页面 4.2.2.1 增加下载方法 4.2.2.2 点击导出报表按钮调用下载方法 5. 最终效果 5.1 点击按钮 5.2 报表展示 6.小结 1.技术栈 1.1 前端采用vue,官方提供 UI套件用的是iview 1.2 后台是abp——aspnetboilerplate 即abp v1, https://github.com/aspnetboilerplate/aspnetboilerplate。 下载时选择的是net core 3.1。 2. Excel导出需求 管理后台系统,主要以图表统计形式归档数据,用户经常会有Excel导出报表的需求。可以以文件形式保存,更加地直观,符合使用习惯。 3. 升级日志Excel导出

Office文件的奥秘——.NET平台下不借助Office实现Word、Powerpoint等文件的解析(完)

一曲冷凌霜 提交于 2020-08-06 10:26:56
【题外话】 这是这个系列的最后一篇文章了,为了不让自己觉得少点什么,顺便让自己感觉完美一些,就再把OOXML说一下吧。不过说实话,OOXML真的太容易解析了,而且这方面的文档包括成熟的开源类库也特别特别特别的多,所以我就稍微说一下,文章中引用了不少的链接,感兴趣的话可以深入了解下。 【系列索引】 Office文件的奥秘——.NET平台下不借助Office实现Word、Powerpoint等文件的解析(一) 获取Office二进制文档的DocumentSummaryInformation以及SummaryInformation Office文件的奥秘——.NET平台下不借助Office实现Word、Powerpoint等文件的解析(二) 获取Word二进制文档(.doc)的文字内容(包括正文、页眉、页脚、批注等等) Office文件的奥秘——.NET平台下不借助Office实现Word、Powerpoint等文件的解析(三) 详细介绍Office二进制文档中的存储结构,以及获取PowerPoint二进制文档(.ppt)的文字内容 Office文件的奥秘——.NET平台下不借助Office实现Word、Powerpoint等文件的解析(完) 介绍Office Open XML文档(.docx、.pptx)如何进行解析以及解析Office文件常见开源类库 【文章索引】 初见Office

abp框架Excel导出——基于vue

眉间皱痕 提交于 2020-08-06 07:56:58
abp框架Excel导出——基于vue 目录 abp框架Excel导出——基于vue 1.技术栈 1.1 前端采用vue,官方提供 1.2 后台是abp——aspnetboilerplate 2. Excel导出需求 3. 升级日志Excel导出 4. 技术实现方案 4.1 后台 4.1.1 EPPlus导出静态方法 4.1.2 生成升级日志列表 4.1.3 将升级日志列表放到Excel导出静态方法中去 4.1.4 abp框架中前后端分离模式文件流传输 4.2 前端 4.2.1 vuex的action中添加请求方法 4.2.2 upgradeLog.vue升级页面 4.2.2.1 增加下载方法 4.2.2.2 点击导出报表按钮调用下载方法 5. 最终效果 5.1 点击按钮 5.2 报表展示 6.小结 1.技术栈 1.1 前端采用vue,官方提供 UI套件用的是iview 1.2 后台是abp——aspnetboilerplate 即abp v1, https://github.com/aspnetboilerplate/aspnetboilerplate。 下载时选择的是net core 3.1。 2. Excel导出需求 管理后台系统,主要以图表统计形式归档数据,用户经常会有Excel导出报表的需求。可以以文件形式保存,更加地直观,符合使用习惯。 3. 升级日志Excel导出

Send excel email attachment c#

喜欢而已 提交于 2020-07-16 10:44:29
问题 I have a method that creates an excel file and sends it as an email's attachment. The sending method works, but the issue is that it converts the excel to a txt file and when you open it says This file has been removed . I use EPPLUS library to create the excel file and save it in a determined location. I can open the created file without any errors. What can I do to make sure the excel file is sent without getting "removed"? Method that creates the excel file private static string

X-Axis label formatting issue while exporting Chart to Excel using EPPlus

天大地大妈咪最大 提交于 2020-06-29 04:49:55
问题 I am using EPPlus library to exporting charts from the application. But I want to change the text direction of X-Axis labels of exported graphs. I am not able to find the property in epplus. I have attached the image of property which I want to change in the graph using EPPLUS. This is code to export the graph from Dataset to excel sheet. using (ExcelPackage objExcelPackage = new ExcelPackage()) { int i = 0, startIndex = 1, endIndex = 1, j = 0; string[] seriesValues; string[] seriesHeader;

EPPlus : date column returning int rather than the actual displayed text value

我只是一个虾纸丫 提交于 2020-06-27 23:09:25
问题 I am using EPPlus to read excel data. I need to display the excel cells as-is in the grid to the users. while reading date column EPPlus is giving the OADate int value for the date. Is there a way I can read the value as string, which users normally see when they open the excel. i.e. the value after applying the excel formats. There does not seem to be any function on the CELL class which provides valueAsString or valueAsDisplayed, etc... 回答1: If the dates are stored in excel as doubles (or a

How to load text containing commas in a single Excel cell with EPPlus

房东的猫 提交于 2020-06-27 10:12:24
问题 I'm giving a try to the EPPlus library and I'm stucked at this: I have to load a text in a single cell, but when this text contains a comma the code that I'm using split my text along multiple cells (along the right direction). Here is the code that I'm using to load the text: using (ExcelPackage pck = new ExcelPackage()) { //Create the worksheet ExcelWorksheet ws = pck.Workbook.Worksheets.Add("MySheet"); using (ExcelRange range = ws.Cells[1, 1]) { range.LoadFromText("this works"); } using

EPPlus 2.9.0.1 throws System.IO.IsolatedStorage.IsolatedStorageException when trying to save a file bigger than ~1.5 MiB from a SSIS package

ⅰ亾dé卋堺 提交于 2020-06-24 12:54:07
问题 The problem When I try to save a file over ~1.5 MiB with EPPlus ExcelPackage.Save() throws a System.IO.IsolatedStorage.IsolatedStorageException . The explanation I'm creating a SSIS package with Visual Studio 2008 9.0.30729.4462 QFE and .NET Framework 3.5 SP1 to export the content of a SQL Server 2008 SP2 10.0.4311.0 64 bit table through the EPPlus 2.9.0.1 library. The SSIS package is really simple: an Execute SQL Task which reads the table's content and puts it in a variable followed by a

Write to Excel file hosted on Sharepoint 2016 using EPPlus (C#)

笑着哭i 提交于 2020-06-13 10:04:00
问题 I'm trying for many days to write to an excel file without success. The file is hosted on a sharepoint 2016 site which I am the administrator. I can read all the sheets of the file without any problem. But when I try to load it to an ExcelPackage variable, it seems, the stream length is 0. You have details of what happening in the code comments. Do you have any idea of what I'm doing wrong ?? Any help will be appreciated. Here is the code : public static ClientContext clientContext; private