How to open Excel sheet write protected? - excel

I have Matlab code using xlswrite to save data to an excel sheet.
Can I open Excel such that Matlab will still be able to write? Also, can I refresh silently?
(In Notepad++ this would be realized via Preferences > MISC > Update Silently, very useful for logfiles)
Thanks!

I am not aware of any way to achieve your 'Refresh Silently' functionality.
Of course, you can open an Excel file read-only easily using VBA or via the File Open dialog.

Related

How can I close the clipboard in Excel with VBA?

I’m preparing an Excel file to collect data from external users.
Users will have other Excel files open and they will also have the clipboard open in those files. This will, by default it seems, result in the clipboard being open in my file.
Is there a way to automatically close the clipboard, if it is open, with VBA code when users open the file? (I only want to close it. It doesn’t have to be emptied before doing so.)
My concern is that the clipboard takes up too much space in the left margin. I want the screen to have maximum width when the file is opened.
The code should work for Excel 2013 and later versions.
It sounds like you just want this:
application.CommandBars("Office Clipboard").Visible = False

Excel::Writer::XLSX and "Read-Only" flag?

I'm trying to find a way to get Excel::Writer::XLSX to write a spreadsheet that will prompt the user to open it Read-Only. In the way MS Excel can when Save As.. Tools, General, Options is used.
Excel prompting user on file open
This functionality was added recently in Excel::Writer::XLSX 1.08 via the the workbook read_only_recommended() method: Changes file.

How to Modify an excel document, save as pdf and print it with Python

I need your help please, I want to automize my everyday tasks with python code. I need to open an existing excel document, modify some information in it(ex: date) then save it as pdf and print it.
Is it possible to do all these via python?
I have tried to do this with openpyxl, I can open and modify the sheets, but' I can't save as pdf only one sheet of the workbook and print it then.
Try using xlwings, it allows you to use more or less any Excel feature because it's actually opening the file and working on it (you can decide if that's done in the background or you can actually see it).
Why you need to use Python?
I think easiest way is write macro in VBA excel (which can updating values in your sheet) and than print it out as PDF or .

SSIS - Can't open Excel file in protected view

I'm running into a strange issue when trying to load excel spreadsheets into my database through SSIS (2012).
I'm getting the spreadsheets (which are xlsx files) via email, and then I manually save them to my local drive (C:\temp). When I try to use the excel file as a source in SSIS, I am not able to pick any excel sheets in the book.
The file is not corrupted, not open on my machine, and not password protected. It is, however, opening in Protected View. So I go into Excel and turned off all the Protected View options, but no cigar. The only way I am able to use the file as an excel source in SSIS is by opening it, and saving over it.
Does anyone have a similar experience? Other than opening and saving all of the files manually, is there a better solution?
It's a known issue with xml based excel (xlsx). If you can save them as xls, that will solve the problem. If for some reason that's not possible you may need to use OLE source to read them.

Recovering datas from an Excel/ActiveX spreadsheet

I'm having the following issue: I've an Excel spreadsheet with a lot of VBA codes and ActiveX controls, including RExcel formulas.
The Excel version is 2007.
When I try to open this file, Task Manager says Excel isn't answering and something starts like if Excel started running endless codes; I deactivated each control and it still seems broken.
I would like to recover at least some formulas I've written in that spreadsheet, but this is actually impossible by opening the spreadsheet in conventional way.
Could you tell me how I can "read" formulas and text in that spreadsheet without opening it by Excel?
Thanks,
Indeed have calculation set to manual for a start.
Now set your security settings such that macros and activeX are disabled:
Excel Options > Trust Center > Trust Center Settings... > Macro Settings > Disable all macros with notification
For ActiveX I am not sure if there is a menu in excel-2007 like for macros, but if there is make sure it is set to not run as well.
Now you can open your excel workbook and it will not run your macro's and shouldn't auto calculate or update!
ADDED: I have had something like this in the past and this is what worked in 1 occasion: install an other office excel application, like open office (the calc application has the excel functionality) and see if it opens in that application. Then if it does, save the file (under another file name) and close it. Open the new file under MS Office Excel, and see what is still recoverable.
Good luck!
use a tool like 7zip to extract the files. the sheets/formulas are in the .xml
the code in a macro enabled spreadsheet is in a .bin file
this can be read with MalOfficeScanner

Resources