I have an Excel file (format Excel 5.0/95) which is extracting data from a
database with a web-application using a Software called CrystalReport. After
creating this report I open the file, and run a macro (written in Excel XP
VBA), which creates a Pivot table. Now I get an error message "Cannot create
Pivot table source file <& filename>". Strangely, I don't get this error
message when I save the file first Checking into the problem, I found that
once I open the file from IE6.0 the Excel header shows the file name with the
appendix [1] (example: Prww2a-EXCELacf21669baaa40d[1].xls ), while
ActiveWorkbook.Name shows this file's name with the appendix (1). The
difference is appendix [1] vs. (1).
When developing the macro, I used Netscape 7.1 and did not have this error;
Firefox also does not cause this error. It's only occurring in IE6.0 (which
is our company supported browser)
The error occurs in this line when creating the PivotCache:
Sheets(MWS).Activate
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
MWS & "!R1C1:R" & LRow & "C" & LCol).CreatePivotTable
TableDestination:="", _
TableName:="NSID_Pivot"
The parameters are: MWS = main Worksheet name, LRow = last row of data, LCol
= last column of data.
I also get this error when creating a Pivot without my macro using the Pivot
Wizard.
Any idea why I get this error? Any way to suppress the appendix [1] when
opening in Excel? Unfortunately saving the file first is not an option.
Any idea why I get this error? Any way to suppress the appendix [1] when
opening in Excel? Unfortunately saving the file first is not an option.
I greatly appreciate your support.
Regards,
Wolfram Schneider
Bookmarks