xls

.xls convert to xlsx using java and POI APACHE

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 11:33:59
I'm trying to use POI.APACHE to edit excel files in java. I have to convert a .xls to .xlsx because I need to send the file to sharepoint. Thats why it just can't be renamed with a different extension. How would I go about this? I couldn't find any examples on their site. Thanks import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Iterator; import org.apache.poi.hssf.usermodel.HSSFWorkbook

How to use POI SXSSF to read a large spreadsheet

℡╲_俬逩灬. 提交于 2019-12-04 11:14:52
问题 I am trying to read an xls file by using SXSSF. I have read about SXSSF, but do not understandexactly how to use it. So I am running into some problems. Can anybody help me with the java code for reading large xls files (some 100,000 rows and 7-8 sheets). (Edit from the comments) Here is what I have tried: Workbook workBook = new SXSSFWorkbook(200); workBook = WorkbookFactory.create(inputStream); Sheet sheet = workBook.getSheetAt(0); int totalRows = sheet.getPhysicalNumberOfRows(); for (int i

Creating Excel XLS files on iOS

孤者浪人 提交于 2019-12-04 10:45:43
问题 I am trying to create a report in Excel format, ready to be sent by email. So far I have found that the best and simplest way is to create an xml document as follows and save it as xls. <?xml version="1.0"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"> <Worksheet ss:Name=

Libreoffice converting html to xls or xlsx

孤人 提交于 2019-12-04 10:13:15
I am trying to use Libreoffice to convert a HTML file to XLS or XLSX format. With LibreOffice 4.0.4.2 running on CentOS release 6.5 (Final) I was able to convert simple html to Microsoft XLS with the following command. soffice --headless --convert-to xls my_file.html I've been testing on the latest LibreOffice 5.0.4.2 without success. I'm using the following command and including the filter: libreoffice5.0 --headless --convert-to xls:"MS Excel 97" test.html It returns the following. convert /path/to/test.html -> /path/to/test.xls using filter : MS Excel 97 Overwriting: /path/to/test.xls Error:

Import excel data into models via django admin

岁酱吖の 提交于 2019-12-04 09:32:16
问题 I need the Django Admin interface to accept administrator uploads of Excel files where the data in each Excel file is inserted into my database models. How can I make such an “Upload” button appear on a Django model admin page, where clicking the button asks the administrator to choose an .xls file, whose data then gets added to database once its upload is complete? 回答1: I'm not sure about the Django side of things, but you can use xlrd to read and manipulate Excel files. There is a free PDF

In which class should I load my data when using MVVM

廉价感情. 提交于 2019-12-04 08:20:39
I'm currently learning C#, and recently I've learned about the MVVM design pattern for WPF. I am writing a simple program as a way to practice this, but I'm not sure where I should write the method that loads the data. I have a SalesSheet class, as shown below. This holds the data that I load from a .xls file. class SalesSheet { public List<Row> Rows { get; set; } public SalesSheet() { Rows = new List<Row>(); } public class Row { public string CallType { get; set; } public string HistoryText { get; set; } } } My question is, where should I write the method that loads the data? Is it bad

Classic ASP XLS output with carriage return in cell

我只是一个虾纸丫 提交于 2019-12-04 04:56:29
问题 I have a Classic ASP script that outputs an HTML table as an XLS file but have had no luck getting a carriage return/line feed to work within a single cell. For testing I am using code based on Kristof's response to How to output an Excel *.xls file from classic ASP I've tried every method I know of for inserting a carriage return/line feed. My sample code is as follows: <%@ Language=VBScript %> <% Option Explicit Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content

Spreadsheet_Excel_Writer data output is damaged

笑着哭i 提交于 2019-12-04 04:08:36
I use Spreadsheet_Excel_Writer to generate .xls file and it works fine until I have to deal with a large amount of data. On certain stage it just writes some nonsense chars and quits filling certain columns. However some columns are field up to the end (generally numeric data) I'm not quite sure how the xls document is formed: row by row, or col by col... Also it is obviously not an error in a string, because when i cut out some data, the error appears a little bit further. I think there is no need in all of my code here are some essentials $filename = 'file.xls'; $workbook = & new Spreadsheet

How can i read .xls files (Excel) with PHP?

 ̄綄美尐妖づ 提交于 2019-12-04 02:17:13
I need to convert an .xls file to text, i dont need it formatted in any way. The file is filled with productids like PN-5098P, which i will preg_match_all to get. What is the simplest solution? I tried simply opening the file in a regular texteditor, the ids are not showing, so i guess i need some kind of binary converter? Matchu XLS is a complex proprietary format, and it might be difficult to work with. If you end up having trouble with libraries like Clint suggested , consider only accepting files in a more simpler format, like CSV, which is super-duper easy to deal with. If that solution

Converting .XLSX to .XLS in Python with win32com.client module

笑着哭i 提交于 2019-12-03 22:08:35
问题 I am trying to find a way to convert many files from .xlsx to .xls and have been trying Python with the win32com.client module: import win32com.client xl = win32com.client.Dispatch("Excel.Application") wb = xl.Workbooks.Open(r"C:\Users\Kathleen\Desktop\Exp 1_1\A 1-1-1c.xlsx") wb.SaveAs(r"C:\Users\Kathleen\Desktop\Exp 1_1\A 1-1-1c.xls", FileFormat = 56) wb.Close() xl.Quit() I have no error message but the converted file does not show up in the folder I have it set up for. Not sure what I am