Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have an Excel file, but without extension (or the extension cannot be trusted) and I want to detect whether the file is in XLS or XLSX format. How could one do that in Linux?
The XLSX is actually a zip archive, which means doing a
file excel-file
would return for XLSX something like
Zip archive data, at least v2.0 to extract Zip archive data, at least v2.0 to extract
and for XLS something like
Composite Document File V2 Document, No summary info
Of course in Windows one could simply open the XLSX file with an unarchiver.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
We have a system that creates files that are imported into Oracle. The files have the naming convention...
Filename.0000
Where the numbers are incremented with each export. So one file might be filename.4357 and the next file will be filename.4358.
I have managed to import the file into a spreadsheet as a comma delimited file where I then carry out some cleansing of the file.
I then want to save the file back to this unusual type .0000 but I can only seem to save it as Excel, CSV, TXT, PDF etc.
Does anyone have any ideas ? Thank you in advance.
Nothing yet
Save the file as a txt file and close it. Then rename it in Windows Explorer.
You can also do that with VBA. Use the NAME command to rename it to a file name with the desired extension.
https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/name-statement
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Does anyone know how to convert existing XLS files to either CSV or XLSX format using VBA or Powershell on a Windows Server that does not have Office installed on it?
Links and code examples would be appreciated.
I'm not sure I see the value in converting XLS to XLSX as both are usable by the same applications.
To convert XLS to CSV without a dependency upon Excel, check out the ImportExcel module.
Import-Excel -path PATH_TO_EXCELFILE | export-csv -notypeinfo -path PATH_TO_CSVFILE may be all you need. I'm away from a Windows machine at the moment so I can't test that but it'll get you started.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Simple question:
Is it currently possible to invoke LibreOffice from a command line to open a *.xlsx and convert/save it as a *.csv?
Alternatively, if this is not possible what is the current best method for doing this via command line (needs to be invokable via script)?
Thanks,
Here is the command:
localc --headless --convert-to csv:"Text - txt - csv (StarCalc)" *.xlsx
The above will save all converted files in current directory(directory from where you'll run the command). All converted files will have their filename extensions changed to csv.
Alternative, method is the use of unoconv which i've not used.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a problem with open an JPG (or even TIF) file on Windows Server 2003.
No program want to open a picture.
I try to use Windows Preview, MS Paint and event Paint.NET.
Thad "bad" files are generated by OpenText OCR software.
When I copy that "bad" file to my machine, all works fine.
Then I resave image on my computer and put back to the Windows Server 2003 - all works!
All seems that such format is not supported by Windows Server 2003, but why?
Can anyone help?
Message form MSPaint:
Paint
C:\Temp\output.jpg
Paint cannot read this file.
This is not a valid bitmap file, or its format is not currently supported.
OK
Finally I found that there are some header added to JPEG file before JPEG content and terminator added after JPEG content. It can be seen through using Hex editor and comparing with regular JPEG file.
Solution is to keep content between two JPEG markers 0xFFD8 and 0xFFD9.
Useful source about JPEG format:
http://www.media.mit.edu/pia/Research/deepview/exif.html
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
An excel file exists on a network that can be accessed by several users.
However, after some investigation it was found that some users open the file as read-only.
I'm opening the file with VBA and workBook.Open(). This routine has a read-only property, but even explicitly sending this parameter as false, the file still opens as read only. When users who experienced this bug were asked to open the file straight from the network, the file opens as read only, despite being fine for other users. Additionally, permission rights to the folder has been ruled out as the cause.
Does macro security prevent a file from being opened normally? What else can cause a file to open as read-only?
More Details:
Windows 7
Excel 2007
.xls File Type
In Save As options/Tools/general Options ,there is a read-only recommended option, it can be.
[]'s