Copying data from a sharepoint site into Excel using VBA - excel

I am new to VBA and SharePoint. I have been researching a lot of different forums and help sites, but I still can't find what I am looking for.
I am using Excel 2007 I am trying to copy a Summary tab from different excel documents on a sharePoint site. The excel documents are in different folders and I am prompted for read only or Edit before the workbook opens. There are only 25 or so workbooks that I am trying to pull.
I would ideally like to pull the summary information from the different excel workbooks into one master excel sheet with each summary sheet having its own tab in the master excel document. I think I can write the code for that part it getting the information to the master excel document that I am not sure where to start. Any help or advice would be great!

You may want to look at JavaScript and make it to work with all browsers. Look at this library https://github.com/stephen-hardy/xlsx.js and the related site https://github.com/stephen-hardy/xlsx.js

Related

Does SharePoint support Excel spreadsheets linked to each other?

I have a master excel sheet on sharepint (called "masterfile.xlsx") that I want to link to another Excel file (called "file-test.xlsx") in different folders on sharepoint.
I need that the "masterfile.xlsx" reflect any changes in the worksheet "file-test.xlsx"
Thanks
Write your formulas in your master workbook to include the URL to the online content. The links will not update when you display the master workbook in the browser (online), but can be updated by opening the master workbook in a desktop Excel.
='https://yourDomain.sharepoint.com/sites/yourSite/Shared Documents/[yourExcelFile.xlsx]Sheet1'!$A$1
You can link them using Excel's PowerQuery:
https://answers.microsoft.com/en-us/msoffice/forum/all/linking-two-excel-worksheets-in-sharepoint-online/cfe2741b-f09b-4d22-93ee-37218261a4d4
You can relink the files using Mapped Drives (mapping a drive letter to a SharePoint library), but this is not a good solution unless all users of the Excel file are willing to map to the library using the same drive letter.

How to copy data between two Excel workbooks?

I am trying to write an Excel add-in that would copy data between two workbooks.
What I would like to do is described here, but I would like to do that using the office-js.
Since office-js-based add-ins also work in the web browser, I would probably need to create a new Excel workbook from second (non-opened) workbook data and then copy the data over to the first workbook. I found the API call that allows me to open the workbook, but I am at a loss on how to use that workbook (get the data from it).
Any suggestions would be greatly appreciated.
Currently, Office Web Add-ins have no way of working with more than one open document at a time. It's an interesting idea. Please suggest this on Office Developer Suggestion Box. Or vote up one of the existing suggestions. A couple of possibilities:
Enable Excel to open a workbook in the same doc
Copy and paste ...

Add VBA code to all worksheets for ALL excel workbooks in a folder?

I searched but could not find any topics on this specific use case.
I have developed code that I want to implement on multiple (>100) different excel files and was wondering if there is a way using VBA or other to add the VBA code to ALL worksheets in ALL excel workbooks in a specific folder.
In addition, I will need to enable Microsoft Internet Controls reference in all as well.
Thanks in advance.

Loss of number/date formatting when linking MS Excel files to MS Access

Hi and thanks in advance for the help.
I have an Access 2007 database that has tables created by live links to several Microsoft Excel 2010 spreadsheets.
I have several Access macros that run queries against these linked tables, and I find that the formatting of the output is in very strange formatting if I run the macros, without first having those linked Excel spreadsheet files open.
To put it another way, if I open the linked spreadsheets and run the Access macros, all the data formats correctly, but if I have the linked Excel spreadsheets closed when I run my Access macros, the formatting goes all funny - particularly with date fields.
Can anyone offer any advice on how I can resolve this problem?
Many thanks
Kim
I usually create a straight select query for each linked Excel table.
In this you can force any formatting or conversion you may need as well as using alias to obtain more friendly field names.
Then use this query and not the linked table for the further processing.

Embedding excel workbook on a website

I have a payroll excel workbook that I want to embed on our company intranet in order so that employees can open the page, fill out the appropriate cells in the spreadsheet and print it out. The workbook has countless pages and is filled with macros so simply recreating the table in HTML wont work. I have attempted to use Skydrive to do this but unfortunately the workbook is excel 93-2007 format which is unsupported for embedding. What is another way to go about doing this? Ideally I would like to have it on its own page, viewable in an iframe.
Is very simple., save the excel in another version -2007 or 2010 and that's it.

Resources