What is the Excel equivilent of...

D

David Thielen

Hi;

We are porting our AddIn from Word to Excel and I need to know what is the
Excel equivilent of:

1) Document.Variables - we use this to store our data with each Word document.

2) Document.Content & Range.get_XML() - we use these to read in the
spreadsheet in XML form. And in this case what is the XML form - is it the
Excel 2003 SpreadsheetML or the new XLSX?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jason Lepack

I don't know about (1) but (2a) is probably workbooks.openxml. (2b) I
don't know.
 
J

Jialiang Ge [MSFT]

Hello Dave,
1) Document.Variables - we use this to store our data
with each Word document.
As far as I know, the Variables interface in Word system is mainly designed
to be used to preserve macro settings in between macro sessions.

(http://msdn2.microsoft.com/de-de/library/microsoft.office.interop.word.vari
ables(VS.80).aspx)
It is introduced into Word because the ordinary variables (Dim x As
Integer) in Word cannot stay in public module-level scope. The variable may
differ in different sessions of Word. Do you still remember your post
"Losing Menu Events"? It is the same issue that Word loses its reference to
CommandBarButton objects in different sessions, so we need to find the
button object each time we need to reference it.

In Excel, we do not have the similar session issue. We can declare the
variable as public module-level scope so that it can be available in
different macros. (For more information about variables in Excel, see the
KB article http://support.microsoft.com/kb/843144). I do not find a
equivalent of Document.Variables in Excel, partially because Excel does not
need such a property for its variables. I have sent an email to product
team, to confirm my conclusion and I will get back to you as soon as
possible.
2) Document.Content & Range.get_XML() - we use these to read in
the spreadsheet in XML form. And in this case what is the XML form
- is it the Excel 2003 SpreadsheetML or the new XLSX?
If I do not mistake, the equivalent should be
range.Value(xlRangeValueMSPersistXML)
It is the Excel 2003 SpreadsheetML.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Dave,

I am still waiting for product teams' responses. I will get back to you as
soon as possible.

Thanks for your patience.
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Dave,

We could use custom document properties
(ThisWorkbook.CustomDocumentProperties) to store some variables in each
xlsx file. Here is an example:
http://www.cpearson.com/excel/docprop.htm
Please check to see if it fits your request.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top