Questions tagged [xls]

xls is the file extension for files created using the default format of Microsoft Excel (prior to Excel 2007).

xls is the file extension for files created using the default format of Microsoft Excel (prior to Excel 2007). An Excel file uses the BIFF (Binary Interchange File Format) format. Documentation for the format has been made publicly available by Microsoft, and can be found on MSDN

1871 questions
31
votes
6 answers

Excel spreadsheet generation results in "different file format than extension error" when opening in excel 2007

The spreadsheet still displays, but with the warning message. The problem seems to occur because Excel 2007 is more picky about formats matching their extensions than earlier versions of Excel. The problem was initially discovered by an ASP.Net…
Jeff Bloom
  • 1,266
  • 3
  • 12
  • 14
31
votes
1 answer

How to change font color of particular cell apache poi 3.9

I can change foreground color with the following code in apache POI. Now I want to change font color of a single cell. CellStyle style = wb.createCellStyle(); style.setFillForegroundColor(IndexedColors.GREEN.getIndex()); …
H4SN
  • 1,482
  • 3
  • 24
  • 43
29
votes
7 answers

Get formula from Excel cell with python xlrd

I have to port an algorithm from an Excel sheet to python code but I have to reverse engineer the algorithm from the Excel file. The Excel sheet is quite complicated, it contains many cells in which there are formulas that refer to other cells (that…
alexroat
  • 1,687
  • 3
  • 23
  • 34
29
votes
5 answers

Autofit column in ClosedXML.Excel

I understand that the question stupid and from FAQ, but i cant set auto width in excel columns (using ClosedXML.Excel library) my code: var wb = new XLWorkbook(); var wsDep =…
krabcore
  • 885
  • 2
  • 8
  • 22
29
votes
1 answer

can git be used for version control on non text documents such as word doc or xls etc

I've been learning about the GIT version control system recently and It seems to work very well for plain text documents as you can add a single line, go back and fork it, revise the document and remove the line you just added. I program mostly in…
yoshiserry
  • 20,175
  • 35
  • 77
  • 104
29
votes
5 answers

Invalid row number (65536) outside allowable range (0..65535)

I am reading integers from a text file, giving them as input to a query and getting the query output and writing to an xls file. ResultSet rs; Connection con = null; PreparedStatement ps = null; int person_org_id, external_person_org_id; File f =…
Cindrella
  • 1,671
  • 7
  • 27
  • 47
28
votes
5 answers

How to convert JSON to XLS in Python

Does anyone know how can I convert JSON to XLS in Python? I know that it is possible to create xls files using the package xlwt in Python. What if I want to convert a JSON data file to XLS file directly? Is there a way to archive this?
fakelbst
  • 578
  • 2
  • 6
  • 13
25
votes
7 answers

Convert Excel document (xls) to a plist

I have a pretty straightforward Excel spreadsheet, and I need to use the data in an iPhone app. The xls document has 6 columns, and > 200 rows. I would like to create a plist from the xls document. How can I convert one to the other,…
John Muchow
  • 4,798
  • 8
  • 40
  • 40
24
votes
10 answers

How to change pivot table data source in Excel?

I want to change it from one database to another. There don't appear to be any options to do this on the pivot table context menu
adolf garlic
  • 3,034
  • 7
  • 39
  • 54
24
votes
4 answers

Direct downloading a xls file without writing it to the directory by Spreadsheet gem

I am using this Spreadsheet gem to export xls file. I have the following codes in my controller: def export @data = Data.all book = Spreadsheet::Workbook.new sheet = book.create_worksheet :name => "data" contruct_body(sheet, @data) …
PeterWong
  • 15,951
  • 9
  • 59
  • 68
24
votes
9 answers

What is the best way to create XLS file in PHP

I am currently trying to figure out the best way to create a .xls file from PHP. It seems like to me that all I need to do is change the header content type to "application/vnd.ms-excel", and then output data in a comma separated format. Is this the…
Metropolis
  • 6,542
  • 19
  • 56
  • 86
20
votes
2 answers

Convert XLS to CSV on the server in Node

I have a client-side web application, with a very minimal node server to access some data that the client can't. One of these things is excel spreadsheets with .xls extensions. I'm trying to get my server set up to download the xls, convert it to…
fnsjdnfksjdb
  • 1,653
  • 5
  • 19
  • 33
20
votes
5 answers

Read only specific sheet

I am trying to read just one sheet from an xls document and I have this: $objPHPExcel = $objReader->load('daily/' . $fisierInbound); $objWorksheet = $objPHPExcel->setActiveSheetIndex(0); foreach ($objPHPExcel->getWorksheetIterator() as $worksheet)…
ardb
  • 6,075
  • 5
  • 14
  • 16
20
votes
6 answers

Download excel file from page via WebApi call

I'm trying to send a 9MB .xls file as a response from web api controller method. The user will click a button on the page and this will trigger the download via the browser. Here's what I've got so far but it doesn't work however it doesn't throw…
Neil
  • 5,179
  • 8
  • 48
  • 87
17
votes
4 answers

How do I convert a date into a time when parsing an .xls doc using Rails?

I'm using Rails 5. I want to parse an .xls (not to be confused with .xlsx doc) using the code below book = Roo::Spreadsheet.open(file_location) sheet = book.sheet(0) text = sheet.to_csv csv = CSV.parse(text) arr_of_arrs = csv …
Dave
  • 15,639
  • 133
  • 442
  • 830