excel file automatically saved in text file form but still has .xlsx file type
Afficher commentaires plus anciens
developing gui where user can create excel file to write analyzed data to. When created the excel file is saved in the notepad as a .xlsx file type. When you open it has a lots of gibberish. When you right click and select open with, and select excel, it opens the file in excel and the data is there and formated corrrectly. What changes do i make on either matlab or even possibly on my computer so that the excel file is created in excel not in notepad?
3 commentaires
dpb
le 2 Août 2023
"When created the excel file is saved in the notepad..."
That makes no sense unless you have opened notepad initially with a text file.
If so, "Don't do that!"
You'll have to show us what you're actually doing in the specific code section; if you use any of the higher-level i/o routines to write a file with an Excel extension, they will format the file content automagically to match the storage mechanism associated with the particular extension. That seems to be working and your system links to file types wouldn't seem to be broken if that works from Explorer as normal.
If you instead mean that an Excel extension (one with .x*) actually is being opened by Notepad by the file association in the OS, then that does imply you've broken that link and need to fix it. Precise steps for that can be found at the Microsoft links you can get with net search; they differ minutely depending on which version you're using.
Other than seeing actual code to know what you've done, specifically, the generalities are all can say...
Stephen23
le 2 Août 2023
"When created the excel file is saved in the notepad as a .xlsx file type"
Files are not saved "in the notepad", files are saved to the the storage device/s of your computer.
"When you open it has a lots of gibberish."
This is expected if you open any random binary file in notepad.
"When you right click and select open with, and select excel, it opens the file in excel and the data is there and formated corrrectly. What changes do i make on either matlab or even possibly on my computer so that the excel file is created in excel not in notepad?"
It sounds like you have changed the file associations of your OS so that .XLSX opens with notepad: possibly after clicking "always open with this application" or something similar. In that case, you need to fix the file associations of your OS. This has nothing to do with MATLAB.
Roshan Patel
le 2 Août 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!