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

3538 questions
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
40
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
  • 8,190
  • 2
  • 24
  • 23
39
votes
3 answers

Error in printing data.frame in excel using XLSX package in R

The dataframe is visible with out any error. But when the same is printed using write.xlsx fucnction of the package XLSX, it gives the error. Error in .jcall(cell, "V", "setCellValue", value) : method setCellValue with signature ([D)V not…
gaurav kumar
  • 859
  • 2
  • 10
  • 24
37
votes
4 answers

PHP Read xlsx Excel 2007 file

I am using oleread to read uploaded xls file. But I am not able to read xlsx files saved in excel-2007 format. can someone help me on how to read xlsx file in PHP.
user255392
  • 413
  • 1
  • 5
  • 6
34
votes
6 answers

Horizontal text alignment in openpyxl

I'm trying to change the text alignment to the center of 2 merged cells. I've found some answers that didn't work for my case: currentCell = ws.cell('A1') currentCell.style.alignment.horizontal = 'center' #TypeError: cannot set horizontal…
Pythonizer
  • 1,080
  • 4
  • 15
  • 25
33
votes
4 answers

how to open xlsx file with python 3

I have an xlsx file with 1 sheet. I am trying to open it using python 3 (xlrd lib), but I get an empty file! I use this code: file_errors_location = "C:\\Users\\atheelm\\Documents\\python excel mission\\errors1.xlsx" workbook_errors =…
Atheel Massalha
  • 483
  • 1
  • 4
  • 10
33
votes
4 answers

Insert image in openpyxl

Is it possible to insert an image (jpeg, png, etc) using openpyxl? Basically I want to place a generated image with a chart below it. I don't see anything in the documentation, which seems to be a little lacking compared to the maturity of the code.
tomc
  • 555
  • 2
  • 6
  • 11
31
votes
7 answers

How to generate an .xlsx using php

I need to generate an Excel file with extension .xlsx. Here is my simple code: $file = "test.xlsx"; header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment;…
angel enanod
  • 431
  • 1
  • 5
  • 12
29
votes
3 answers

How can I prevent Chrome from blocking a XLSX download?

A recent update to Chrome has begun blocking XLSX downloads coming from our website. I have read Chrome's documentation and guidelines about how they determine if something is potentially harmful but it makes no mention of how to resolve issues…
Jordon Biondo
  • 3,974
  • 1
  • 27
  • 37
27
votes
3 answers

How to convert a nested json object into an excel table using the xlsx npm library?

I've got a nested json object. For the sake of simplicity: data = {'key1': 1, 'key2': 2, 'key3': {'nestedKey1': 3, 'nestedKey2': 4}} A real object is bigger but the point is that it's a nested one. Values may be strings, numbers or other…
GoBear
  • 518
  • 1
  • 5
  • 19
27
votes
6 answers

SheetJS xlsx-cell styling

I am referring this example to export a worksheet https://github.com/SheetJS/js-xlsx/issues/817. How to do cell styling like background coloring,font size and increasing the width of the cells to make the data fit exactly.I have gone through the…
GrailsLearner
  • 485
  • 1
  • 11
  • 23
26
votes
1 answer

sheetjs xlsx, How to write merged cells?

I need to create a xlsx with merged cells using sheetjs. data: [ { "id": "nick", "items": [ { "name": "ball" }, { "name": "phone" } ] }, { "id": "jack", "items": [ { …
chacker
  • 315
  • 1
  • 4
  • 8
24
votes
8 answers

Format date with SheetJS

Thank you in advance for taking a look at this question! I am trying to use SheetJS to read a .xlsx file but am having some trouble with a column of dates that is formatted via Excel as Custom "yyyy/mm/dd hh:mm:ss". All of these dates show up as…
sivs
  • 677
  • 1
  • 5
  • 11
24
votes
6 answers

Code to read xlsx sheet into a table in a SQL Server database

I am trying to read data from an Excel sheet (.xlsx file) into a table in SQL Server 2008. I want this to be run everyday as a batch job and hence want to write SQL code in a stored procedure to do so. Could someone help me? I have admin…
aaryan
  • 277
  • 1
  • 3
  • 9
23
votes
7 answers

When getting cell content using Apache-POI Library, I get both "Cannot get a numeric value from a text cell" and the reverse of that. How do I fix it?

I realize the question is a little confusing, but I didn't know how else to word it. Anyway, here is the original code: private void readFile(String excelFileName) throws FileNotFoundException, IOException { XSSFWorkbook workbook = new…
crstamps2
  • 606
  • 2
  • 6
  • 16