Tag: export to excel

如何从Excel模板生成Excel图表

我在Excel表格中有10列数据 我创build了一个2列(薪水,平均)和由这两列产生的graphics的Excel模板 我需要把这个Excel模板作为input,输出应该是 “具有2列数据的excel表单和由该数据生成的图表或图表” neds紧急帮助… thnx

c#当string数据超过255个字符时,错误插入Excel

我正试图导出一些数据到Excel。 我正在使用OLEDB 12.连接string看起来像: "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES;'" 我使用INSERT查询。 但是,只要目标列中的数据超过255个字符,就会发生exception。 Exception Details: System.Data.OleDb.OleDbException: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 在SO上有一个类似的post: Excel无法插入超过255个字符? 但是它并没有进入c#, 我也提到http://support.microsoft.com/kb/213841并没有得到任何解决scheme。 请帮忙。

Excel文件是由文件扩展名(从gridview导出的Excel)指定的不同格式

我正在将一个gridview导出到一个excel文件,并打开就好了。 唯一的问题是,每当打开excel文件时总会popup这个警告: The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? 我正在使用的代码: HttpContext.Current.Response.Clear(); HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Single_Raw.xls")); HttpContext.Current.Response.ContentType = […]

从数据集导出数据到excel

我试图从数据集导出数据到Excel,并直接保存到给定的path,而不给我打开,保存或取消的选项。

Java:byte 数组到Excel到BLOB

我有一个字节[]数组,需要被转换成一个有效的Excel电子表格。 在转换字节数组之后,Excel电子表格必须caching到数据库中,最好是BLOB。 首先,我试图创build一个WritableWorkbook: WritableWorkbook workbook = Workbook.createWorkbook(byteArrayOutputStream); … workbook.write(); 这对我来说工作得很好,但我不知道如何将工作簿作为BLOB存储到数据库中。 这甚至有可能吗? 还是有另一种方式? 可选:而不是byte []数组,我也可以使用反序列化的对象。 工作簿API: http : //jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/Workbook.html

从gridview c#格式导出到excel标题文本

我从gridview出口到excel。 有什么办法来格式化标题文本并将其包装在Excel中? 我出口到Excel代码为 grdCommon.Font.Size = FontUnit.XSmall; grdCommon.GridLines = GridLines.Both; grdCommon.Style["font-family"] = "Arial, Helvetica, sans-serif;"; grdCommon.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; grdCommon.HeaderStyle.ForeColor = System.Drawing.Color.White; grdCommon.HeaderStyle.BackColor = System.Drawing.Color.FromArgb(80, 124, 209); grdCommon.HeaderStyle.Font.Size = 8; grdCommon.HeaderStyle.Width = 30; 我试着添加下面的格式在Excel中的标题列。 但excel头不会被包装 grdCommon.HeaderRow.Style.Value = "word-break:break-all;word-wrap:break-word"; grdCommon.HeaderRow.Cells[0].Wrap = true; 并修改了这个方法 grdCommon.HeaderRow.Style.Add("background-color", "#FFFFFF"); as grdCommon.HeaderRow.Style.Add("word-wrap","true"); 有什么build议么…

Excel文件中的下拉项目限制数

考虑这个代码: var dropDown = sheet.DataValidations.AddListValidation(cells[2, colIndex, maxCol, colIndex].Address); foreach (var bb in brokerBranchs) { dropDown.Formula.Values.Add(bb.Title); } 29 dropDown项目一切正常,并创buildExcel文件工作正常,但作为项目数超过29,打开创build的文件显示以下错误: 打开损坏的结果文件会丢弃与所有列关联的所有下拉项目。 这个问题有什么可能的解决办法? 任何帮助将不胜感激。

没有Interop的Excel导出

我试图完成从VB.NET(Windows窗体)应用程序导出到Excel。 不幸的是,我不能使用Office Interops,因为应用程序应该可以在每台机器上工作 – 即使没有安装Excel。 我在网上find了下面的例子: Public Sub ExportDatasetToExcel(ByVal ds As DataSet, Optional ByVal strHeader As String = "Save As") 'Proudly copied from: 'http://www.daniweb.com/software-development/vbnet/threads/368400/write-into-excel-using-oledb-connection#post1583200 Dim fileSave As New SaveFileDialog() fileSave.Filter = "Excel 97-2003 Workbook (*.xls)|*.xls" fileSave.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) fileSave.Title = strHeader fileSave.ShowDialog() Dim xlsFilePath As String = fileSave.FileName If xlsFilePath = "" Then Exit Sub […]

Excel自动化:打开现有的Excel文件作为“新”

我想为我的应用程序提供“一键式”excel导出function。 因此,我需要在临时位置创build一个excel文件,因为我需要使用第三方组件来执行此操作。 我想Excel然后打开文件。 我可以达到这一点; 但是Excel总是会记住它加载文件的位置。 我想加载的文件显示为一个“新”文件,不保存到一个特定的位置,所以当用户想要点击“保存”(不保存)或closuresExcel提醒他们未保存的更改。 我在.net 3.5上使用C#中的Excel Automation

如何导出多个HTML表格,以优秀?

我有一个有3个表格的网页,我想把它们全部导出到同一个excel文件中。 我希望每个表格都在自己的表格中,但是把它们都放在同一张表格上也可以。 一些谷歌search后,我所看到的是一个表格出口到一个Excel表。