Description: I am using the following command to to convert .xls file to pdf: soffice.com --headless --convert-to pdf “D:\InputFiles\word2pdf\input.xls” --outdir D:\InputFiles\word2pdf The above command is successfully converting that file to pdf. But when I am changing its extension to .xlsx and executing the same command getting an error. Any idea why it is happening? Both files are opening in LibreOffice. Steps to Reproduce: 1.Use the command provided in the description to translate both the files 2. 3. Actual Results: it should translate .xlsx file Expected Results: Translation for .xlsx file failed. Reproducible: Always User Profile Reset: No Additional Info: Both the files are opening in Libre
Created attachment 179654 [details] This is .xlsx file, which gives an error while running with given command.
Created attachment 179655 [details] .xls file which gets translated successfully.
(In reply to Vikas from comment #0) > Both the files are opening in Libre (In reply to Vikas from comment #1) > Created attachment 179654 [details] (In reply to Vikas from comment #2) > Created attachment 179655 [details] The two attachments are identical (indeed, as you indicated that you just renamed the extension). However, they *both* can't be opened here using both Excel 2016, and LibreOffice (neither 7.2, nor 7.3) - they are nor XLS, nor XLSX files. When you open the XLS file, and immediately try to Save As, what is the file type that is suggested in the File Save dialog?
If both files are neither XLS nor XLSX then why Libre is converting it into PDF? Libre should throw an error. When I am trying Save As for XLS file, the file save dialog is suggesting .csv format.
(In reply to Vikas from comment #4) > If both files are neither XLS nor XLSX then why Libre is converting it into > PDF? Libre should throw an error. It does here with the files you supplied. > > When I am trying Save As for XLS file, the file save dialog is suggesting > .csv format. I am sure then that you have sent different files, not the ones that you used locally for conversion.
Trying to guess with assumption that the attached documents are not the correct ones. (In reply to Vikas from comment #4) > When I am trying Save As for XLS file, the file save dialog is suggesting > .csv format. This means that you are working with some CSV files that are renamed to XLS (and XLSX). CSV files are basically just plain text files, that have specific structure allowing to parse them as structured tabular data. We have a special rule in our import to allow text files with XLS extension to be opened in Calc. But not for CSV files disguised as XLSX; this means that when you open such a "pseudo-XLSX", you would usually open it in Writer. But: (In reply to Vikas from comment #0) > Both the files are opening in Libre This is likely because you try to open the pseudo-XLSX from Calc already open, in which case, current module (Calc) is taken into account (this is also true for RTF and HTML files, by the way). But if I'm correct, then trying to open such XLSX from your file manager, or from LibreOffice with no Calc document open, you would get it opened in Writer. (In reply to Vikas from comment #0) > But when I am changing its extension to .xlsx and executing the same command > getting an error. And this is confusing. There should not be errors, if the above is a correct guess. Simply the PDF should be from Writer, not from Calc.
The shared file seems to be an UGS type one. "UGS" could be for Universal-G-Code-Sender?
Hi All, Let me explain everything properly. I had one 3D .prt file which I renamed and just changed its extension to .xls and .xlsx. Out of which .xls is getting translated( ideally it should fail). And .xlsx file is failing with an error "Source file could not be loaded". I just want to understand this scenario. As both files are invalid and should not be translated by Libre.
(In reply to Vikas from comment #8) > I had one 3D .prt file which I renamed and just changed its extension to > .xls and .xlsx. Out of which .xls is getting translated( ideally it should > fail). Could you please attach the resulting PDF of such conversion?
(In reply to Vikas from comment #0) > Both the files are opening in Libre Also please attach a screenshot how the XLSX looks like when opened in LO.
(In reply to Vikas from comment #8) > I just want to understand this scenario. Also please clarify, what is your goal. You have filed a *bug report* - which is how we tell that something is broken, and needs fixed. You are using invalid input to the program, using two different wrong extensions to make LibreOffice try to open the file; and describe some behavior that should be either denial to open the document, or showing some garbage (both are OK). You haven't yet explained what result you actually see (I mean, is the "XLS" gets converted to the PDF with the proper 3D image of the data in the original PRT, and what shown on screen when "both the files are opening in Libre"). Up to this point, I assumed that your "open" means "I see the proper document", but now I think that you simply wanted to know why there's the difference between *error on loading and loading of garbage*. If you are just curios, please do *not* abuse the bug tracker, and ask such questions (with *proper* explanation of the procedure, circumstances, results and your goal) at https://ask.libreoffice.org. I'm inclined to close this INVALID.
Aha, I see now that this is https://ask.libreoffice.org/t/libre-is-throwing-error-if-xls-file-is-renamed-to-xlsx/76368/. Since it lacked all useful information there, it couldn't be answered properly.
I opened an issue here because I was not able to upload files properly to https://ask.libreoffice.org. I didn't want to abuse the bug tracker. Hence filed it as a Bug here.