Excel column 256 limit

A

Ana Dionísio

Is there some way to go around this limit? I need to import data from python to excel and I need 1440 columns for that.
 
D

Dave Angel

Is there some way to go around this limit? I need to import data from python to excel and I need 1440 columns for that.

Doesn't sound like a Python question. But one answer is Libre Office
Calc, which seems to have a 1024 column limit.
 
S

Steven D'Aprano

Is there some way to go around this limit? I need to import data from
python to excel and I need 1440 columns for that.

That's an Excel question, it has nothing to do with Python.

Have you considered using something other than Excel? As I understand it,
OpenOffice, LibreOffice, and Gnumeric do not have a 256 column limit.
Gnumeric is Linux-only, but the other two are available for Windows and
Mac, and they are all free, open source software, and they all will read
and write Excel spreadsheets.


http://openoffice.org/
http://www.libreoffice.org/
http://projects.gnome.org/gnumeric/index.shtml
 
G

Grant Edwards

Doesn't sound like a Python question. But one answer is Libre Office
Calc, which seems to have a 1024 column limit.

[I don't see how something with a 1024 column limit is one answer for
a requirement of 1440 columns.]

IMO, if 256 columns isn't enough, then a spreadsheet probably isn't
the right tool. If you need 1440 columns then I can't even imagine a
case where a spreadsheet is the right tool.

I've seen people spend weeks trying to do something with excel that
would have taken a few hours using Numpy/Scipy/Scientific-Python.
 
D

Dietmar Schwertberger

Am 18.03.2013 16:28, schrieb Ana Dionísio:
Is there some way to go around this limit? I need to import data from python to excel and I need 1440 columns for that.

There are many versions of Excel. The recent ones can handle more than
256 columns. If your version doesn't, then Python won't help you to
increase this limit...
There are many ways to get data from Python into Excel. If you have any
specific problems, you should provide more details.

Regards,

Dietmar
 
M

Michael Ross

That's an Excel question, it has nothing to do with Python.

Have you considered using something other than Excel? As I understand it,
OpenOffice, LibreOffice, and Gnumeric do not have a 256 column limit.

Just for completeness:
Excel in it's "Office 2010" version does not have a 256 column limit
either.
I can use > 2000 columns without problem.
 
A

Ana Dionísio

But I still get the error and I use Excel 2010.

I'm trying to export data in a list to Excel
 
A

Ana Dionísio

But I still get the error and I use Excel 2010.

I'm trying to export data in a list to Excel
 
N

Neil Cerutti

But I still get the error and I use Excel 2010.

I'm trying to export data in a list to Excel

xlrd: Library for developers to extract data from Microsoft Excel
(tm).

It is for *reading* Excel files, not writing them. To get data
into Excel use the csv module and create the file using the
default 'excel-csv' format. Then load the file using Excel.

Creating an Excel file directly in Python is possible, but I
think it will require use of the Pywin32 extensions.
 
M

Michael Ross

xlrd: Library for developers to extract data from Microsoft Excel
(tm).

It is for *reading* Excel files, not writing them. To get data
into Excel use the csv module and create the file using the
default 'excel-csv' format. Then load the file using Excel.

Creating an Excel file directly in Python is possible, but I
think it will require use of the Pywin32 extensions.

I use and recommend http://pythonhosted.org/openpyxl/ for creating Excel
files from Python.
No trouble so far.
 
I

Ian Kelly

xlrd: Library for developers to extract data from Microsoft Excel
(tm).

It is for *reading* Excel files, not writing them.

There's xlrd[1] for reading and xlwt[2] for writing native XLS files.
If the OP needs greater control over things like formatting and
formula-cells, I'd suggest xlwt, as CSV restricts you to shoveling
around the data, not its formatting.

xlwt however only writes .xls files, not the newer .xlsx files, so it
is still subject to the 256-column limit no matter what version of
Excel you use to open the workbook.
 
N

Neil Cerutti

But I still get the error and I use Excel 2010.

I'm trying to export data in a list to Excel

xlrd: Library for developers to extract data from Microsoft Excel
(tm).

It is for *reading* Excel files, not writing them.

There's xlrd[1] for reading and xlwt[2] for writing native XLS
files. If the OP needs greater control over things like
formatting and formula-cells, I'd suggest xlwt, as CSV
restricts you to shoveling around the data, not its
formatting.

xlwt however only writes .xls files, not the newer .xlsx files,
so it is still subject to the 256-column limit no matter what
version of Excel you use to open the workbook.

It's also Python 2.3-2.7 only. :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,773
Latest member
Kaybee

Latest Threads

Top