Is my vba code lost when saving to google drive? - excel

I have uploaded an xlsm file to google drive. When opening it uses google sheets, and when downloading it converts it to xlsx (no vba modules). Is there another way to get my code back? (The original file on my computer is gone).

Apologies, self answer.
In Google Drive Settings there is a toggle box to 'Convert uploaded files to google docs editor format'. This was ticked and so I lost the code as soon as I uploaded.
I have since tested it and without that tickbox ticked, the file remains in xlsm format, even if you open it in google sheets.
Also that tickbox is not ticked by default, so you really have to put some effort in to lose all of your code like I did.

Related

Easy way, without the user having Excel installed, to use xlsx (with hyperlinks) online?

I'm using one parent folder that includes:
one xlxs file that has a column of hyperlinks.
one sub-directory that contains photos.
The hyperlinks open the photos just fine (locally) but after uploading the exact directory structure to dropbox or google, either the hyperlinks break, or the xlsx formatting takes a serious hit. The aforementioned behavior is experienced using the same PC and software that created the dir and file.
Works locally, but online, opens the xlsx and breaks the hyperlinks (dropbox) -or-, in the case of google, screws-up the xlsx formatting; yet the hyperlinks work. I was hoping for a solution that would not involve scripting/coding; to just upload and it works.

Excel Hyperlinks to Excel documents not working

We have a excel document that contains a ton of Hyperlinks to other Excel Documents & File Paths all located on our network. All of a sudden the Hyperlinks to the Excel Documents have broken, Excel will state the error below;
Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source.
Would you like to open this file? OK/Cancel
We click OK and nothing will happen. Opening file paths is still working fine and I've created another Excel document which has links to a PDF, a File Path, a Word Doc & an Excel Doc. Still only the Excel that isn't working.
I have followed several articles online that suggest how to disable the warning message,below is a well detailed article for 2007/2010 but we had tried to adapt it for 2013/6. Nothing I have tried is working, does anyone on Stack have any suggestions?
https://support.microsoft.com/en-gb/help/925757/how-to-enable-or-disable-hyperlink-warning-messages-in-2007-office-pro
We are using Office 2013/6 Standard/Professional.
Any help would be greatly appreciated!!
Many thanks,
Sean
This happens when you copy the excel file to different location:
You can do test: place hyperlink into 1 cell save it, and then copy the file to another location: you can see that hyperlink of your copied excel file would not work.
However when you choose the same file to "Save As": the hyperlink of the saved file in different location will work.
For excel internal hyperlinks (hyperlinks to other worksheet cells) similar thing happens when you rename the file: hyperlinks won't work, but they will work if you choose to "Save As".
This means, the solution to this problem would be: copy the excel file to it's original location and name it with the original name (when hyperlinks were working). In this case hyperlinks will work. Then if you need to move or rename the file: open the file from original location and select "Save AS" anywhere you would like to save, in this case hyperlinks of your saved file would work.
Conclusion: relative references to the Excel file in hyperlinks are not automatically updated when externally file is moved or renamed.
So we managed to find out what was the cause of this problem.
Microsoft are currently working on fixing this as stated in the article below, but as a quick fix you simply need to remove Windows Update KB4011051.
https://support.office.com/en-gb/article/Hyperlinks-to-another-Excel-workbook-no-longer-work-after-updating-to-the-August-1-2017-update-KB-4011051-dfe0aa5c-a2ba-41b8-923a-fe0e4556f936
Thanks for the assistance,
Sean

Problems scrolling in Excel Online with Selenium

I'm running a test to verify the contents of a file in Office 365. The file is a .xlsx file. I can open the file in excel online and verify the contents of the spreadsheet up to a point - unfortunately it's a large file and I need to scroll down to make more data visible. I've tried the following:
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("window.scrollBy(0,1200)", "");
and
driver.findElement(By.xpath("XPATH")).sendKeys(Keys.PAGE_DOWN);
but neither seem to do anything. Can anyone suggest something else? Is there a way I can drag the scroll bar downwards?
EDIT:
Browser is Firefox.
I should have been more clear about the 'file' - it's an attachment which is uploaded to an Outlook group in Office365. I open it simply by clicking on a link. This then opens in Excel Online which displays as a frame on top of the normal Outlook screen.
By using:
Browser.getTopBrowser(driver);
driver.switchTo().frame("CollabOfficeDocumentBody");
driver.findElement(By.xpath("class"));
I can find the contents of individual cells, but only to a certain point (54 rows down I think).
I'm not sure if this answers your questions...

Automatically converting Excel Files to Google Sheets

I have a google account that uses the save emails and attachments add-on.
https://chrome.google.com/webstore/detail/save-emails-and-attachmen/nflmnfjphdbeagnilbihcodcophecebc?hl=en
The email account only receives excel sheets as attachments, and those are saved to a specific folder automatically.
Is it possible to have those sheets converted automatically to google sheets upon save (or after save). Currently, I have to open the file with google sheets to convert it.
I have tried setting the folder to Convert uploaded files to Google Docs editor format, but that doesn't work for this.
Any suggestions would be greatly appreciated.
Eric
if you're wishing to do this with the Drive API, then you can do so using the examples given in Upload Files, see the section headed Importing to Google Docs types. Essentially, by setting the source file MIME type to application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and that of the new file to application/vnd.google-apps.spreadsheet, this indicates that the conversion is required on upload.

Export to Excel, open, enable editing and all the formulas change

I have an important spreadsheet I have created using Google Docs. This is over many tabs pulling numbers into the first tab. It all works well in Google Spreadsheets but I need to download it.
When I download it as Excel and open it it shows OK but asks me to enable editing / saving. As soon as I do this the data changes on the sheet and all my formulas are screwed.
Can anyone help?
I am new to this so I hope I have posted in the correct area :)
Do you already own excel ?
To export a Google Sheets file to Excel, open the Sheet, go to File > Download As and select .xlsx.

Resources