Finding a Way Around XLSREAD Not Working with OpenOffice

  • Context: MATLAB 
  • Thread starter Thread starter physicsCU
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the challenges of using the xlsread function with OpenOffice, specifically addressing the compatibility issues and exploring alternative solutions for reading spreadsheet data. Participants consider the implications of using different file formats, particularly focusing on CSV files as a potential workaround.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants suggest that xlsread does not function properly with OpenOffice, raising the need for alternative methods to read spreadsheet data.
  • One participant proposes using comma-separated value (CSV) files instead of xls files, arguing that CSV is a more universal and manageable format for data handling.
  • Another participant expresses concern about the complexity of their data, noting they have around 12 sheets and are looking for modifications to the xlsread function.
  • It is mentioned that CSV files can be loaded using the csvread command, which is highlighted as a straightforward method for handling text files with comma-separated values.
  • Participants discuss the limitations of the xls format, describing it as a binary format that may not align with the assumptions made by the developers of the xlsread function.

Areas of Agreement / Disagreement

There is no consensus on the best approach, as participants present differing views on the utility of xlsread versus CSV files, and the discussion remains unresolved regarding the specific modifications needed for xlsread.

Contextual Notes

Participants express uncertainty about the compatibility of xls files created by OpenOffice with the xlsread function, and there are unresolved questions regarding the handling of multiple sheets of data.

physicsCU
Messages
198
Reaction score
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
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-separated-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.
 
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?
 
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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
6K
Replies
2
Views
8K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
5
Views
3K
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K