Finding a Way Around XLSREAD Not Working with OpenOffice

  • MATLAB
  • Thread starter physicsCU
  • Start date
In summary: So, if you have a lot of xls files that you need to read in, it might be worth converting them to CSV first.
  • #1
physicsCU
202
1
so i guess xlsread won't work with openoffice. is there a way around this?

there has to be, xlsread is an editable file, but I need to know.

Thanks!
 
Physics news on Phys.org
  • #2
physicsCU said:
so i guess xlsread won't work with openoffice. is there a way around this?

there has to be, xlsread is an editable file, but I need to know.

Thanks!


Use comma-seperated-value files instead of xls files. xls format is a bad one to be working with IMO. Working with CSV files will make your life much easier, its a universal format (not much of a format even) that can easily be handled by any spreadsheet/data analysis program, and more importantly is easy to deal with in your own code.
 
  • #3
OK, i can try that.

for what i am doing, it involves a lot of sheets of data, something on the order of 12 sheets. its a bit rough, but I have access to excel in a lab. i was hoping there was something i could change in the xlsread file.

i presume CSV files are loaded with the load command?
 
  • #4
physicsCU said:
OK, i can try that.

for what i am doing, it involves a lot of sheets of data, something on the order of 12 sheets. its a bit rough, but I have access to excel in a lab. i was hoping there was something i could change in the xlsread file.

i presume CSV files are loaded with the load command?


csvread is the command. Its just a text file, with the values separated by commas.

The problem with using xls (well, there are several problems) is that its a nasty binary format, and if you use an xls made by open office it won't necessarily match the assumptions that the Matlab programmers made when they wrote the code for the xlsread function. CSV files are just simple text, separated by commas, they will always work, no matter what program saved them. it could have been notepad, excel, or open office, it won't matter.
 

Related to Finding a Way Around XLSREAD Not Working with OpenOffice

1. Why is XLSREAD not working with OpenOffice?

XLSREAD is a function within Microsoft Excel that allows users to read data from Excel files. However, this function is not compatible with OpenOffice, as it is a different software with its own set of functions and features. Therefore, XLSREAD will not work with OpenOffice and you will need to use a different function or method to read data from Excel files in OpenOffice.

2. Can I convert my Excel files to a format that is compatible with OpenOffice?

Yes, you can convert your Excel files to a format that is compatible with OpenOffice, such as the OpenDocument Spreadsheet (.ods) format. This can be done by saving your Excel file in the .ods format or by using a file conversion tool.

3. Is there an alternative function to XLSREAD that I can use with OpenOffice?

Yes, there are several alternative functions that you can use to read data from Excel files in OpenOffice. Some examples include the GETPIVOTDATA function, the VLOOKUP function, and the INDEX function. You can also use the built-in "Text Import" feature in OpenOffice to import data from Excel files.

4. Will using an alternative function affect the data in my Excel files?

No, using an alternative function to XLSREAD will not affect the data in your Excel files. These alternative functions are designed to perform similar tasks and should not alter the data in any way.

5. Can I still use XLSREAD if I have both Microsoft Excel and OpenOffice installed on my computer?

Yes, you can still use XLSREAD if you have both Microsoft Excel and OpenOffice installed on your computer. However, you will need to specify the correct file path and format in order for XLSREAD to work with Excel files. Alternatively, you can use the "Text Import" feature in OpenOffice to import data from Excel files without needing to specify a file path or format.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
Back
Top