Shaik Posted August 13, 2018 Share Posted August 13, 2018 How to change the extension of excel file(from xls to xlsx) after downloading it. After clicking on download button, Excel file with the extension of xls is downloaded (I am using ie). After clicking on save as button on window pop-up, after changing the file name, can I change the file extension from below file type drop down. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 13, 2018 Share Posted August 13, 2018 @Shaik What did you try so far? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
AutoBert Posted August 13, 2018 Share Posted August 13, 2018 2 hours ago, Shaik said: How to change the extension of excel file(from xls to xlsx) Have you ever tried what happens after changing it in explorer, i suggest use _Excel_Open and _Excel_Save. After savinf you can delete the original. All other ways the excel files could be damaged. Link to comment Share on other sites More sharing options...
Shaik Posted August 14, 2018 Author Share Posted August 14, 2018 After clicking on download button , excel window popup will appear . using my auto it script , i am clicking on 'save as' option under the save button and changing the file name in 'File Name' textfield and in 'File type' i am unable to see the xlsx file extension option. could you please suggest me how can i change the file extension to xlsx after downloading it. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted August 14, 2018 Share Posted August 14, 2018 @Shaik @AutoBert suggested to you a valid solution. When I did ask "What did you try so far?", I was meaning "Show us what you tried, in order to see how we can help you". When you ask for help, always post the code you are working with OR a valid reproducer of it. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
jchd Posted August 14, 2018 Share Posted August 14, 2018 @Shaik, Changing *.xls into *.xlsx isn't simply changing the extension, it's mainly changing the file format. Only Excel (and other spreadsheet compatible programs like Libre Office) can read *.xls and convert into *.xlsx. Same as if you get from some link a text file, say "story.txt". Storing it under "story.pdf" will not automagically make it a PDF file! So go with what @AutoBert suggested: save the .xls, open it with AutoIt _Excel_* functions and save it with the other .xlsx format. Earthshine 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
RTFC Posted August 14, 2018 Share Posted August 14, 2018 The additional x-suffix in Office extensions indicates compressed content, making the stored file on disk smaller than when working on it in memory. You can use an extraction utility such as 7-zip on such a file to extract, producing a subdirectory structure (a test .pptx of mine produced subdirs _rels, docProps, and ppt (the latter comprising subdirs _rels, diagrams, drawings, embddings, media, slideLayouts, slideMasters, slides, and theme) , plus a master .xml file. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
Shaik Posted August 16, 2018 Author Share Posted August 16, 2018 Thanks for the valuable suggestions , i changed the excel file with extension xls to xlsx using Auto_Excel Save functions after downloading the file using automation selenium. It is working fine . thanks again Link to comment Share on other sites More sharing options...
Shaik Posted October 8, 2018 Author Share Posted October 8, 2018 hi guys, i worte the script which will convert xls to xlsx . all this time it is working fine now it is saying that 'Error Saving to Workbook' @error = 5 Sometimes it will convert , sometimes it will throw the above error I am attaching the auto it script for your reference , please guide me in resolving this issue. Thanks in advance XlsToXlsx.au3 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 8, 2018 Share Posted October 8, 2018 @Shaik As the Help file says about the error code returned from _Excel_BookSaveAs() function: 5 - Error occurred when saving the workbook. @extended is set to the COM error code returned by the SaveAs method. Try to ConsoleWrite() the @extended code too, so you can see in detail what kind of error do you have with the function Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Shaik Posted October 9, 2018 Author Share Posted October 9, 2018 it throwing the error @extended = -2147352567 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 9, 2018 Share Posted October 9, 2018 @Shaik What do you pass to the first command line parameter when you run the script? Do you already have a "string" which causes the error? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Shaik Posted October 9, 2018 Author Share Posted October 9, 2018 C:\Users\MasthanS\Perforce\InfactWorkspace\QAAutomation_FS\Infact\Automation_FactoryLogger\testData\08-10-2018\Run10\FactoryLogger_SmokeSuite\ShiftTest\ShiftSmokeTest\tc009\Intervaltc009_08_10_2018_22_17_18 I am passing the above path in cmdline[1], after formatting i am giving the same path for the formatted file also Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted October 9, 2018 Share Posted October 9, 2018 I was thinking to the filename was too long, but seems not to be the case. Does this error appear for every file do you try to convert, or only some specific ones? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Shaik Posted October 10, 2018 Author Share Posted October 10, 2018 only specific files , and also after formatting , i am unable to close the excel file if i have some files opened and minimized.If it is the only one , then it closing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now