Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!
Subscribe for Free Excel tips & more!

Sharepoint Export To Excel

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

Does anyone know how to export several lists from sharepoint to excel? Currently I export one at a time via the "Export to spreadsheet" function.

View Answers     

Similar Excel Tutorials

Export an Excel File to a CSV File
How to export an Excel file to a CSV file (comma separated values file).  This allows you to turn any Excel spread ...
Import a Worksheet from One Workbook to Another in Excel
In Excel, you can quickly copy an entire worksheet from one workbook to another workbook.  This allows you to impor ...
Convert Numbers Stored as Text to Numbers in Excel
I'll show you 4 ways to convert numbers stored as text to numbers in Excel.  This situation often happens when you ...
3D References - Formulas that Reference Multiple Sheets at Once in Excel
Have one simple formula that will reference the same cell or range of cells on multiple worksheets at once without ...

Helpful Excel Macros

Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Macro to add a New Line to Message Box Pop-up Windows in Excel
- This is a very simple Message Box, pop-up window, macro for Excel that illustrates how to put new lines, the same thi
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Output the Name of the Current Excel Workbook Including Extension - UDF
- Free Excel UDF to display the name of the current Excel workbook, including the workbook extension. This function has n
Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth

Similar Topics

I am trying to export a chart in a worksheet to a Sharepoint location as a jpg. The code below works with the first export line to my desktop. But I get a runtime error 'method of export of object chart failed' if I try either of the other two that try to send it to sharepoint. I am using Sharepoint 3.0 and Excel 2007. The site is a set as trusted site and I have admin rights.

[code]Sub SaveChrtAsJpeg()
'ActiveChart.Export "C:\Documents and Settings\m204727\Desktop\Temp Files\Chart3.jpg", "jpg"
'ActiveChart.Export " & /charttest.jpg", "jpg"
ActiveChart.Export "", "jpg"
End Sub[code]

I have a hidden excel sheet that houses critical usage statistics that I would like to push to a sharepoint site. I simply want to relay that data to the sharepoint site...

Excerpt of something I read on line:

Exporting data to Excel is well-supported in SharePoint and makes graphing and printing convenient (via the Print with Excel and Chart with Excel options). But it's also possible (and may often be desirable) to export data to Excel just for the sake of manageability. The Excel Export function creates an Excel Web query linking to the original data. In this way, you can create spreadsheets that will accept data, and then push that data to SharePoint.

This can be done by generating an Excel spreadsheet, then linking the spreadsheet to SharePoint (by using Export and Link to Excel from a Datasheet Task Pane). Once this is done, data can be entered into the spreadsheet and pushed from the spreadsheet to Excel with the Synchronize List option.

Any ideas?


Is it possible to import\export data to and from Infopath.
i know i can export Infopath forms into Excel but can i export an Excel spreadsheet into Infopath. I presume if this were possible i would have to have similiar fields in infopath to that in excel for the data i want to export.

i will need to be able to do this via a macro

basicly i will be export data from an application into Excel then export to infopath to display on our intranet site via sharepoint 2007, but it all has to work in 2003 versions as this is what the users have.

Thank you

hello team-

the following VBA exports "myfile.xml" from within an excel file to "mydocuments" folder on my sharepoint server. It exports perfectly as long as there is no existing "myfile.xml" already in the destination folder. It produces an error where there is a previous incidence of "myfile.xml" already in the destination folder..

Can somebody offer me some VBA to overwrite the previous instance of "myfile.xml" with the current file without prompting the user?

I have read/write administrator rights on the sharepoint so it's not a rights access issue on sharepoint (I get the same error when trying to export to my local c:\ as well)


Code BlockSub ExportXML2Sharepoint()

ActiveWorkbook.XmlMaps("XMLMap").Export URL:= _
End Sub


Code BlockRun time error '-2147467259 (80004005)'

Method 'Export' of object 'XMLMap' failed

Thanks Conor

I have a macro that does an export of a chart to a Sharepoint image library. This is the code I am using to do the export:

    Dim oChart As Chart    
    ActiveSheet.ChartObjects("Chart 1").Select
    Set oChart = ActiveChart
    oChart.Export Filename:="\\SharePointAddress\NCC\publishingImages\filename.gif", FilterName:="GIF"

The code works fine on one computer but returns an error on another. The error I recieve is:
Run-time error '-2147286987 (80030035)':
Method 'Export' of object '_Chart' failed
Also it will not work on that same computer for a different user.
The code works anywhere if I change the address to an actual folder location like C:\Images.
I realise this might be more of a problem with sharepoint than excel but it doesn't hurt to try.

Is there an easy way to create a macro for Export to spreadsheet in SharePoint?


Not sure if this is even possible, but I have a co-worker who wants to import the data located in the calendar entries in Sharepoint. I know there is a button which will manually export them to excel. Is it possible to export them using vba?

I attempted linking the website to excel, which imported the file names but not their content.


I want to open a Sharepoint view/list directly in Excel. Sharepoint has the Export to Spreadsheet option under the Actions button.

I found this,, which tells how to build a Excel macro to do this. It worked - almost.

The Sharepoint view has a column of lookup fields with multiple values and they manually export just fine.

The Excel macro opens with all other columns but does not include the lookup fields with multiple values. It just skips right over that column of data.

I need the those multiple values.

Using Excel 2007 - I also saved the XLS macro as 2003.


Being very much VBA challenged () I am attempting to use the "OutputTo" command in a macro to export a report to a sharepoint site; I am specifying the specific filename. There are no issues with the export, but I'm wondering--is there a way that I can create a unique filename everytime I run the macro (i.e. to have a history of files on the sharepoint)? For example, apend a date and time stamp to the end of the filename?

Appreciate your feedback...

I am using an Access front-end to upload/insert files into an OLE field in the db table. My company is using SQL server as a back-end. Is there a relatively easy way to export a selected group of uploaded files from Access/SQL server & export them to an application like Sharepoint, another MS application, or to a file share location?

I have a SharePoint list that has attachments associated with the items in the list. I need to export the list and all the attachments so I can email it out to people and work on it offline. Does anyone know how this could be done? Can this be done, by exporting it to Access? If yes how?



I'm trying to export an Excel spreadsheet to an XML. The instructions I've
read tell me to go to the "developer" tab and then "export", however the
export function is grey and not available. Any suggestions

Hi All,

I have created an excel application which analyses some data held in SharePoint via a SharePoint list. It then creates an excel export and closes the initial workbook.

I have tried uploading this to SharePoint for use however this causes no end of errors which did not occur when i tested in excel. These errors are usually around objects not being recognised, i tried re-writing my code to dim excel as an application but this makes no difference.

Does Microsoft Office SharePoint Server 2007 allow workbooks with macros to be uploaded and run? Can anyone think of any other reason as to why this does not work?



Hi. I have a report that is in Excel that uses exports from various SharePoint lists. The problem is that two of them can't be refreshed once the document is saved and closed. The other 5 are fine and can be refreshed. Does anyone have any ideas as to why this is happening on the 2 and not on the other 5? I really need to get this report set up in a fashion that all anyone has to do to get the results is just open it and refresh the tables. I can't keep having them re-export the lists each and every time. Thanks to anyone who can help.

Hi, new member here!

I am having some trouble with this.. I usually import data into Access and format/output it from there, but the user wants to do everything in Excel.

On the attached spreadsheet, I have 2 tabs named "data" and "export"

The data tab contains data that I want to ultimately have formatted for export.

The export tab shows the format of the data.

Could someone help me with the code to be able to put behind a button so that the data will be exported as .csv


Hi All,

Here's the short question: the SharePointURL property of ListObject is ReadOnly. I wanna change it!

The long version: I have a SharePoint site where many months ago I did the "Export to Spreadsheet" command. I've since done lots of work on this file, including code that lets the user refresh the data:


So this is a one way pull-the-data-from-SharePoint process. Works fine, back slaps all around.

Now another division wants to use the same process, but wants to keep their own SharePoint list. Easy enough to give them a duplicate site. Now I want to give them a copy of my Excel file, except that it should pull data from the duplicate site.

I don't want to just "Export to Spreadsheet" again from the new site and copy my Excel changes to that workbook. Too many named ranges, dynamic ranges, etc for that to probably work easily.

So any ideas on how to do the equivalent of changing the SharePointURL property of ListObject to point to the new SharePoint?



i've build a database that exports to excel via the transferspreadsheet method.

it pull from the same qry...therefore exports to the same sheet in the excel workbook.

i am running into issues where is wants to export a second sheet and title it "Export1" rather than "Export".

is this because there is already a named range for "Export" i need it to import the qry results to the same sheet "Export" because there is a summary sheet in the workbook that has predefined references to the sheet "Export".


I am using the following Macro to copy certain columns to a new Worksheet in a particular order which is working fine however I have two issues:

1 - When the new worksheet is created the column widths are not being exported over so I have go to the new worksheet an manually adjust the width again.

2 - I have a number of columns which will be move when additional columns are added i.e. from column AB to AC which means I have to change the code again.Is there a way to track these so I do not have to change the code again. In row 5 each of the columns has a unique heading.


Sub CreateExportSheet()
    Dim sh As Worksheet
    Dim DestSh As Worksheet
    Dim Last As Long
    If SheetExists("Export Sheet") = True Then
        MsgBox "The sheet Export Sheet already exist"
        Exit Sub
    End If
    Application.ScreenUpdating = False
    Set DestSh = Worksheets.Add
    DestSh.Name = "Export Sheet"
    Sheets("Sheet1").Columns("D:D").Copy Destination:=Sheets("Export Sheet").Columns("A:A")
    Sheets("Sheet1").Columns("Q:Q").Copy Destination:=Sheets("Export Sheet").Columns("B:B")
    Sheets("Sheet1").Columns("S:S").Copy Destination:=Sheets("Export Sheet").Columns("C:C")
    Sheets("Sheet1").Columns("U:U").Copy Destination:=Sheets("Export Sheet").Columns("D:D")
     Sheets("Sheet1").Columns("AB:AB").Copy Destination:=Sheets("Export Sheet").Columns("P:P")
    Sheets("Sheet1").Columns("AH:AH").Copy Destination:=Sheets("Export Sheet").Columns("E:E")
    Sheets("Sheet1").Columns("N:N").Copy Destination:=Sheets("Export Sheet").Columns("F:F")
    Sheets("Sheet1").Columns("AI:AI").Copy Destination:=Sheets("Export Sheet").Columns("G:G")
    Application.ScreenUpdating = True
End Sub
Function SheetExists(SName As String, _
                     Optional ByVal WB As Workbook) As Boolean
    On Error Resume Next
    If WB Is Nothing Then Set WB = ThisWorkbook
    SheetExists = CBool(Len(Sheets(SName).Name))
End Function

Can anyone help?


I'm trying to use vba to export a graph as gif.
Use this as example code:
Sub Create_GIF()
Dim mychart As Chart
Set mychart = ActiveSheet.ChartObjects(1).Chart
mychart.Export FileName:="c:\Mychart.gif", FilterName:="GIF"
End Sub

The path where I want to save to is part of sharepoint.
Path looks like: etc..
The sharepoint site is connected as a network drive in my explorer so I can enter is straight from explorer.

When I try to save to this path I get error 1004 application defined or object defined error. When I save for instance to my C-drive everything works ok.

Any ideas?


Ok so I got the majority of the coding down for what I need. However, I keep getting stuck when I get to the second part and need to export the table to excel. I have tried using tab controls and just can't seem to get it to work. The url is As you will see after entering the project info and pulling up the report you get the option to export the data to excel. I can't figure out the vba to focus that area and export.

Please Login or Register  to view this content.

Hi All,

Access and Excel 2003.

Is there a way by any chance to export data from Access to Excel, to a specific template that formats the fields better?

I know how to export data to excel, but the Time field comes up as "00-JAn-00" for all records. Also, some of the State and Research accounts aren't show because the column isnt wide enough and I have to fix that to see all of the data. There is also a couple other small format issues.

So I'm wondering if its possible to set something up like that for excel to eliminate these formatting issues because I need export to excel on a daily basis??

Thank you in advance

I'm trying to build my own set of VBA source code tools and I want to be able to Export (as a .txt file) the current procedure I am working on. I can export whole modules (standard and class) but I can't see how to export a single procedure (only). Is there any way I can do this?

Hi all,

I have a macro which is able to export mails from Outlook to excel(thanks to some help on here )
The problem is i have to select the folder each time i want to export. I cannot find how to hardcode the values in.

Is there a way of recording a macro in outlook to go to the file>import/export>export to CSV> select folder.

My thinking is that if i can somehow generate the code similar to how the excel macro recorder would make it for one folder, i can reiterate it on all other folders i need to export(A Lot)

I have been trying to get IE to export a database table to EXCEL. It will
not do it.

I can right click on the body of the data and say EXPORT to EXCEL - but it
won't export or go to the clipboard.

How can I get it to do that?


I just created an EXCEL 2007 file that does a screen scrape of a web site within one of its worksheets. I am now trying to make it available via sharepoint. I tried to export the range as a sharepoint list, but when I create the range, it forces me to kill any connections with an outside source, therefore, killing my screen scrape. Is there anyway to get around this problem?