Excel file locked after opening in Microsoft Data Report Designer - excel

I develop an application in VB6 and my data source is Excel 2007. And I have created 2 reports in Microsoft Data Report Designer.
My program is working. I can save data (update)in excel file and view existing data via VB6. And I have written code to backup (copy paste) the excel file in another folder. This is also working as I wanted.
But after I open or view the DataReports, I cant save the data in the Excel and backup the excel file. Then I will have to close the application to update and backup excel sheet.
When I try to save data in Excel file after viewing the report I receive the message
The excel file already exists
When I try to backup after viewing and closing the report I receive the error message
Run time error 70" Permission denied
Need help please.

Related

Macro Cannot See Open Workbook from Sharepoint

I am running a macro from an excel workbook on my local machine, and at the end of it the macro copies a set of data and pastes it in a log that is in a separate workbook. I can get it working fine when the log is on my local machine, but I am having trouble getting it to copy data to the log when the workbook is stored on the company sharepoint server. I have both files open in excel (with edit permissions on the sharepoint based file), but when I try to open the workbook it fails. Trying to diagnose the problem I even had the macro spit out a list of all the open excel files at the moment and it does not seem to list the sharepoint baesd file (despite it obviously being open at the moment). Any ideas on how I can access this file? I don't necessarily need it to open the file on its own, I am more than happy to go into sharepoint manually and open the file, I just can't get the data to copy across for some reason. Any help that could be provided would be most appreciated, thanks in advance!
The line of code causing the problem is:
Set logbook = Application.Workbooks("Log")
Where the file name is Log.xlsx and that file is open in excel at the time the macro is running.
The error I get is:
Run-time error '9': Subscript out of range

How to download from a data source extension into excel using VBA

I have an online data source that I've linked to excel using the domo excel extension. This enables me to download data tables straight from domo into a an excel doc. My goal is to use a macro to automate the following steps:
At a 12am ET on Sunday morning, open an new excel document
Access the extension and download a data table
Save the newly populated excel table as "Data File (date)" into a specific folder.
In my limited experience with VBA, i attempted to record even just the download process from an open sheet and excel stops recording as soon as I click on the extension tab.
two-part question: First, is there a way to access the extension via my macro? If so, is it possible to schedule the desired process?
Thank you!

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.

SQL Dump to Excel

I'm using SQL Server 2008 and I am dumping data into Excel using OPENROWSET.
Let's call that the "EXCEL DUMPFILE". I have set up multiple Excel files that reference data from the "DUMP FILE". Every time people go into the Excel files to use them the data is not pulling thru from the "EXCEL DUMP FILE" because the DUMP FILE isn't open. Barring creating a script in SQL to open all the files up and refresh and save is there something I can do to make this automatic so that we don't have to have any intervention for people to get the most current data?
Thanks

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