MATLAB Answers

How to convert .stp to .xlsx on a Mac

5 views (last 30 days)
NH
NH on 25 Mar 2013
Hello,
I am running the following code in order to convert many .stp files to .xlsx:
files=dir('*.stp')
for i=1:length(files)
filename=files(i).name;
[pathstr, name, ext] = fileparts(filename);
copyfile(filename, fullfile(pathstr, [name '.xlsx']))
end
The resulting .xlsx files do not open in Excel. The error reads: "This file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file." When converting to .xls, it works perfectly, but I need .xlsx.
I have tried the following with no success:
-Converting to a different format (i.e. .xls, .csv, .txt), and then to .xlsx
-Reading the .stp data into Matlab variables, and using xlswrite. This does not work because I am using a Mac and thus have limited capabilities with xlswrite.
Any help is greatly appreciated.

  3 Comments

Walter Roberson
Walter Roberson on 25 Mar 2013
The .stp file extension appears to be used by several different packages. Please indicate what software is creating the .stp files so we can figure out what needs to be done.
NH
NH on 25 Mar 2013
The .stp file is an output file from LabView.
Walter Roberson
Walter Roberson on 25 Mar 2013
I do find a small number of mentions of .STP files for LabView, but not much at all. Would it be possible for you to upload a small one?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by