export-to-excel

Uploading Excel files to dropbox?

北城余情 提交于 2019-12-24 07:29:07
问题 I am trying to upload a file I am creating using ExcelWriter via pandas. Here is what I have so far: output = BytesIO() writer = pd.ExcelWriter(output, engine='xlsxwriter') df1.to_excel(writer, sheet_name='raw_data', index=False) df_totals.to_excel(writer, sheet_name='totals', index=False) writer.save() output.seek(0) dbx.files_upload(output, 'my_path/test.xlsx') It is throwing the error: TypeError: expected request_binary as binary type, got <class '_io.BytesIO'> The file_upload method takes

Export several matrices to excel in MATLAB

拟墨画扇 提交于 2019-12-24 07:09:35
问题 I want to write to an excel file n matrices, if I would like 2 to be in the same page, and other two on the same page, how to do it I have xlswrite('file.xls', matrix1, 'page1', 'A1'); xlswrite('file.xls', matrix2, 'page1', 'A50'); Is there a way to make dynamic the 4th parameter like xlswrite('file.xls', matrix2, 'page1', 'A'%size(matrix)); 回答1: You can try: xlswrite('file.xls', matrix2, 'page1', ['A' num2str(length(matrix2))]); Hope that helps. 来源: https://stackoverflow.com/questions

Add apostrophe character to Excel export with OleDB connection

爷,独闯天下 提交于 2019-12-24 03:01:35
问题 I want to generate Excel report identical that we use before (with old version of Excel). The only problem is that all cells in old style reports were presented as strings with apostrophe character: I created basically the same report with the next code: oleDbConnection = new System.Data.OleDb.OleDbConnection( "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileFullPath + ";Extended Properties='Excel 12.0 Xml;HDR=YES' "); oleDbConnection.Open(); oleDbCommand.Connection = oleDbConnection;

Add apostrophe character to Excel export with OleDB connection

不问归期 提交于 2019-12-24 03:01:05
问题 I want to generate Excel report identical that we use before (with old version of Excel). The only problem is that all cells in old style reports were presented as strings with apostrophe character: I created basically the same report with the next code: oleDbConnection = new System.Data.OleDb.OleDbConnection( "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileFullPath + ";Extended Properties='Excel 12.0 Xml;HDR=YES' "); oleDbConnection.Open(); oleDbCommand.Connection = oleDbConnection;

RDLC Page Footer not displaying visual studio 2008

大城市里の小女人 提交于 2019-12-24 01:45:20
问题 I have a project in which I have to use Visual Studio 2008, and I'm trying feverishly to add a Page Footer. It adds from the top menu in VS 2008 under "Reports" However, I cannot see it getting displayed. I have a Excel export link that rips through all the code rendering out the RDLC into Excel. I added a company logo image to the top as a Page Header, that works fine, but not sure why zero from text/images/static and dynamic text is not appearing in footer / bottom of excel page from the

Excel worksheet change event is not firing

蹲街弑〆低调 提交于 2019-12-24 00:35:21
问题 I have created excel workbook using .NET interop. The excel workbook is created successfully through my C# code. When the user makes any changes in the excel, I want to do some stuff. I have used the ExcelWorkSheet.Change event. But this event is not firing. Here is my code- using Excel = Microsoft.Office.Interop.Excel; public class xxx { static Excel.Application xlApp; static Excel.Workbook xlWorkBook; static Excel.Worksheet xlWorkSheet; static Excel.Worksheet xlWorkSheet1; static Excel

RDLC To Excel Export, Header and Footer Character Limit

爱⌒轻易说出口 提交于 2019-12-23 13:06:42
问题 Apparently Excel is hardcoded to only allow 255 characters in footers (and headers I think). Naturally I wanted to put more than that in the footer hence this post. Header Workaround: I found that putting stuff in the RDLC header and setting PrintsOnFirstPage and PrintsOnLastPage to true, when exported DOESN'T actually put the RDLC header items into the Excel Header it just uses a split region (with an empty Excel header) and you can put in as much as you like. Visually it's OK but obviously

c# Error inserting to Excel when string data is more than 255 chars

孤人 提交于 2019-12-23 12:28:42
问题 I am trying to export some data to Excel. I am using OLEDB 12. The connectio string looks like: "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES;'" And I use an INSERT query. But whenever the data in a target column exceeds 255 chars, I get an 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. There is a similar post on SO: Excel

Convert a jagged array to a 2D array directly without iterating each item?

删除回忆录丶 提交于 2019-12-23 12:17:52
问题 I am trying to save a DataTable into an excel sheet.. my code is like this.. Excel.Range range = xlWorkSheet.get_Range("A2"); range = range.get_Resize(dtExcel.Rows.Count, dtExcel.Columns.Count); object[,] rng1 = new object[dtExcel.Rows.Count, dtExcel.Columns.Count]; Excel range requires range value as array[,] but I have the DataTable as jagged array[][]. object[][] rng2 = dtExcel.AsEnumerable().Select(x => x.ItemArray).ToArray(); Is there any built-in function to directly convert the jagged

Open CSV file with correct data format for each column using TextFileColumnDataTypes?

一个人想着一个人 提交于 2019-12-23 12:06:40
问题 I am using the VBA-code below to open a csv-file in Excel (the code simulates the Data\Text to Columns - command). In the code it's necessary to specify an array for the property TextFileColumnDataTypes , which for every column in the csv-file specifies a data format (2 = text format). However, since I don't know how many columns the csv-file will have, I would like to specify the format 2 (= text format) for ALL columns in the csv-file. The problem right now is that I can only specify the