B
Bernd Wechner
I have an application which creates an excel workbook. It works fine using
the Excel 2003 object model to create the workbook. Now if I use the Excel
2007 object model (a simple upgrade) suddenly it throws a link error when its
opened.
I am then frustrated by the still painful lack of link diagnostic tools.
They have improved in 2007 to be sure, marginally. 2003 just points out that
I have links to other data sources and I can choose to update or not update
them. But 2007 actually throws up an editor with various options to fix or
remove the links but still for some reason beyond my comprehension does not
let me know where that link is.
The problem is, I don't ever create a link, not knowingly. I've never had
one, made one or been informed of one after loads of using my app. Now I
upgrade and there magically is one?
It relates suspiciously to one of he worksheets in a temporary workbook I
create. A rough outline of my codeed approach is as follows:
Create Workbook 1 and add some sheets of data and such to it.
Create workbook 2 and add some sheets of data and such to it.
Use Worksheets.Move to move the sheets from Workbook 2 to Workbook 1
Close Workbook 2
Save Workbook 1
Now this has been running fine using Excel 2003 to create the workbooks,
worksheets, moving them and all. And I end up with one workbook with all my
sheets in it and all is well.
If I use Excel 2007 to create the workbooks and worksheets, move them and
all, then whether I open the result .xls file in Excel 2007 or Excel 2003 I
get an error regarding a link. Excel 2007 in its link editor says it
apparently comes from one of the sheets that I moved from workbook 2 to
workbook 1.
Worksheet.Move has no options I can see re: holus bolus clean move or weird
leave links around moves. So what's up? Why does Excel 2007 create the
impression, in the .xls file that there are links. Links I've not created,
was never aware of, don't want, and can't find?
Is this a bug in Excel 2007? Can I share an .xls file that exhibits this
problem with you for diagnosis?
The sheet in question contains some data and a chart. That is all.
Moreover, when Excel 2003 creates the .xls file it is about 300KB in size.
When Excel 2007 creates the .xls file it is about 11MB in size. Yep, that's
an order of magnitude difference and most surprizing.
Yes, I can try and use Excel 2007 to create a .xlsx or .xlsm file instead,
and may do that next, but it doesn't aid in comprehension of the problem. It
is the Workbook.SaveAs method I use to save the .xls file, with parameters
specified appropriately.
This is a little puzzling.
the Excel 2003 object model to create the workbook. Now if I use the Excel
2007 object model (a simple upgrade) suddenly it throws a link error when its
opened.
I am then frustrated by the still painful lack of link diagnostic tools.
They have improved in 2007 to be sure, marginally. 2003 just points out that
I have links to other data sources and I can choose to update or not update
them. But 2007 actually throws up an editor with various options to fix or
remove the links but still for some reason beyond my comprehension does not
let me know where that link is.
The problem is, I don't ever create a link, not knowingly. I've never had
one, made one or been informed of one after loads of using my app. Now I
upgrade and there magically is one?
It relates suspiciously to one of he worksheets in a temporary workbook I
create. A rough outline of my codeed approach is as follows:
Create Workbook 1 and add some sheets of data and such to it.
Create workbook 2 and add some sheets of data and such to it.
Use Worksheets.Move to move the sheets from Workbook 2 to Workbook 1
Close Workbook 2
Save Workbook 1
Now this has been running fine using Excel 2003 to create the workbooks,
worksheets, moving them and all. And I end up with one workbook with all my
sheets in it and all is well.
If I use Excel 2007 to create the workbooks and worksheets, move them and
all, then whether I open the result .xls file in Excel 2007 or Excel 2003 I
get an error regarding a link. Excel 2007 in its link editor says it
apparently comes from one of the sheets that I moved from workbook 2 to
workbook 1.
Worksheet.Move has no options I can see re: holus bolus clean move or weird
leave links around moves. So what's up? Why does Excel 2007 create the
impression, in the .xls file that there are links. Links I've not created,
was never aware of, don't want, and can't find?
Is this a bug in Excel 2007? Can I share an .xls file that exhibits this
problem with you for diagnosis?
The sheet in question contains some data and a chart. That is all.
Moreover, when Excel 2003 creates the .xls file it is about 300KB in size.
When Excel 2007 creates the .xls file it is about 11MB in size. Yep, that's
an order of magnitude difference and most surprizing.
Yes, I can try and use Excel 2007 to create a .xlsx or .xlsm file instead,
and may do that next, but it doesn't aid in comprehension of the problem. It
is the Workbook.SaveAs method I use to save the .xls file, with parameters
specified appropriately.
This is a little puzzling.