SSIS - Can't open Excel file in protected view - excel

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.

Related

Insert Data into Shared Excel file

I have a Shared Excel file stored on a NAS, and i want to insert some data from a csv into the Excel without the excel being unshared.
can i maybe share the excel file programmatically ?
I tried reading the excel with py pandas and then overwriting with the new inserted data,
but then the file isn't shared anymore, so my users that are still using the file won't notice the change and maybe they are going to save their current changes which would overwrite the inserted data,
i also tried using VBS but it didn't work because the excel is shared.
I'm looking for a solution which would allow my users to modify the file without overwriting the new inserted data.
is that possible ?
Thanks for your attention. I’m looking forward to any reply.

VBA modules getting deleted from .xls files for one user but not another

I am automating a project for a user based in a different location.
The project in question includes inputting data into .xls files for the user and the user then runs macros saved in these .xls files (They cannot be changed to .xlm).
I use excel 2016 and can open these files no problem. however the other user can only open them in excel 2007, when opened in 2016 the modules disappear. Anyone have any idea how I can solve this.
So Far I have compared both our setting's in excel, with no outcome. I am unsure where to go from here.
Thanks

Open an Excel File on Sharepoint from SSIS Package without moving it

I'm trying to change some Excel Files which are laying on SharePoint.
This should be performed automatically while my Import to SQL-Server is running. For the Import I'm using a SSIS.
Is it possible to change Excel Files with SSIS? And hwo is it possible?
By the way the SSIS package should open and close the the Excel files so that I got no interferences through open packages.
I'm Using Excel 2013, SQL-Server and Visual Studio 2013
You can use the following code to open Excel-Files on SharePoint:
Dim process As New System.Diagnostics.Process()
process.Start("filepath")
process.Close()
If you get the Excel- File as .xlsm file you can directly process the macro. If you get an .xlsx- file you need to make an extra file which can process macros and then you process the new file.

How to open Excel sheet write protected?

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.

Error messages while opening Excel sheet created by Java POI

After generating the excel sheet using Java POI and opening the newly created Excel file I get a message box saying
Excel found unreadable content in "abc.xlxs" .Do you want to recover the contents of this workbook?If you trust the source of this workbook, click 'yes'.
And when I click 'yes' I get some message like this
Excel was able to open the file by repairing or removing the unreadable content
After that I can view the contents in the sheet. How can I remove all these kind of messages while opening it?
You should check if you use the right api:
For .xls files you must use HSSF.
For .xlsx files you must use XSSF or higher version api.
Check if you write your excel file correct.
And for the right answer, provide some code, please.

Resources