Questions tagged [xlsx]

xlsx is the file extension for files created using the default format of Microsoft Excel 2007 or higher.

xlsx is the file extension for files created using the default format of Microsoft Excel 2007 or higher. This is the Microsoft Office Open XML SpreadsheetML format. This format is based around a zipped collection of eXtensible Markup Language (XML) files. Microsoft Office Open XML SpreadsheetML is mostly standardized in ECMA 376 and ISO 29500.

Resources

2928 questions
302
votes
10 answers

Convert xlsx to csv in Linux with command line

I'm looking for a way to convert xlsx files to csv files on Linux. I do not want to use PHP/Perl or anything like that since I'm looking at processing several millions of lines, so I need something quick. I found a program on the Ubuntu repos called…
user1390150
  • 3,029
  • 2
  • 12
  • 3
243
votes
10 answers

Using Pandas to pd.read_excel() for multiple worksheets of the same workbook

I have a large spreadsheet file (.xlsx) that I'm processing using python pandas. It happens that I need data from two tabs in that large file. One of the tabs has a ton of data and the other is just a few square cells. When I use pd.read_excel() on…
HaPsantran
  • 3,727
  • 5
  • 18
  • 34
164
votes
24 answers

Excel "External table is not in the expected format."

I'm trying to read an Excel (xlsx) file using the code shown below. I get an "External table is not in the expected format." error unless I have the file already open in Excel. In other words, I have to open the file in Excel first before I can read…
Sisiutl
  • 4,745
  • 8
  • 37
  • 54
99
votes
12 answers

Easy way to export multiple data.frame to multiple Excel worksheets

I am surprised to find that there is no easy way to export multiple data.frame to multiple worksheets of an Excel file? I tried xlsx package, seems it can only write to one sheet (override old sheet); I also tried WriteXLS package, but it gives me…
Ogre Magi
  • 1,175
  • 2
  • 10
  • 14
94
votes
14 answers

Importing Excel files into R, xlsx or xls

Please can someone help me on the best way to import an excel 2007 (.xlsx) file into R. I have tried several methods and none seems to work. I have upgraded to 2.13.1, windows XP, xlsx 0.3.0, I don't know why the error keeps coming up. I…
nolyugo
  • 1,351
  • 2
  • 11
  • 12
85
votes
5 answers

Handling java.lang.OutOfMemoryError when writing to Excel from R

The xlsx package can be used to read and write Excel spreadsheets from R. Unfortunately, even for moderately large spreadsheets, java.lang.OutOfMemoryError can occur. In particular, Error in .jcall("RJavaTools", "Ljava/lang/Object;",…
Richie Cotton
  • 107,354
  • 40
  • 225
  • 343
77
votes
8 answers

Importing a big xlsx file into R?

I'm wondering if anyone knows of a way to import data from a "big" xlsx file (~20Mb). I tried to use xlsx and XLConnect libraries. Unfortunately, both use rJava and I always obtain the same error: > library(XLConnect) > wb <-…
user2722443
  • 771
  • 1
  • 5
  • 4
56
votes
6 answers

Parse XLSX with Node and create json

Ok so I found this really well documented node_module called js-xlsx Question: How can I parse an xlsx to output json? Here is what the excel sheet looks like: In the end the json should look like this: [ { "id": 1, "Headline": "Team:…
Armeen Harwood
  • 15,195
  • 30
  • 106
  • 210
52
votes
7 answers

Convert xlsx file to csv using batch

How do you convert multiple xlsx files to csv files with a batch script?
Ankur
  • 1,981
  • 3
  • 15
  • 7
50
votes
4 answers

How to properly assemble a valid xlsx file from its internal sub-components?

I'm trying to create an xlsx file programmatically on iOS. Since the internal data of xlsx files is basically stored in separate xml files, I tried to recreate xlsx structure with all its files and subdirectories, compress them into a zip file and…
nick130586
  • 771
  • 1
  • 8
  • 20
48
votes
8 answers

Python convert csv to xlsx

In this post there is a Python example to convert from csv to xls. However, my file has more than 65536 rows so xls does not work. If I name the file xlsx it doesnt make a difference. Is there a Python package to convert to xlsx?
user670186
  • 2,002
  • 5
  • 29
  • 46
45
votes
6 answers

Conflict with xlsx package and choose.files

I'm having a strange problem with loading the xlsx package and using choose.files. This problem began as soon as I updated RStudio to the newest version (v0.97.237). If I start RStudio and then load xlsx (i.e. library(xlsx)) the package loads…
James
  • 479
  • 4
  • 4
44
votes
8 answers

Setting styles in Openpyxl

I need advice on setting styles in Openpyxl. I see that the NumberFormat of a cell can be set, but I also require setting of font colors and attributes (bold etc). There is a style.py class but it seems I can't set the style attribute of a cell, and…
Nelson Shaw
  • 913
  • 2
  • 9
  • 10
43
votes
2 answers

Looking for a clear description of Excel's .xlsx XML format

Microsoft Excel's ".xlsx" files are zip files that each contain a set of files. Could someone please provide a link that concisely describes the full structure/syntax/markup/format of the embedded .xml files (the headers are less interesting)? For…
none
  • 4,256
  • 13
  • 54
  • 96
39
votes
9 answers

Processing large xlsx file

I need to auto-fit all rows in large (30k+ rows) xlsx file. The following code via apache poi works on small files, but goes out with OutOfMemoryError on large ones: Workbook workbook = WorkbookFactory.create(inputStream); Sheet sheet =…
miah
  • 6,942
  • 2
  • 22
  • 23
1
2 3
99 100