Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
m_karbala
 
Posts: n/a
Default ss:Formula in excel saved in xml format


Hi,
I have a have a excel file in XML format. In the first cell I want to
have a exact formula not a reference formula, meaning instead of
formula="=RC[1]+R[1]C[2]" I want it to be formula="=A1+B1". Is there
anybody how can help me in this case?

Here is the file. You just need to save it as xml and open it with the
excel.
<?xml version="1.0"?
<?mso-application progid="Excel.Sheet"?
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
<Styles
<Style ss:ID="Default" ss:Name="Normal"
</Style
</Styles
<Worksheet ss:Name="Sheet1"
<Table
<Row
<Cell ss:Formula="=RC[1]+R[1]C[2]"
</Cell
</Row
</Table
</Worksheet
</Workbook


--
m_karbala
------------------------------------------------------------------------
m_karbala's Profile: http://www.excelforum.com/member.php...o&userid=27555
View this thread: http://www.excelforum.com/showthread...hreadid=507287

  #2   Report Post  
Posted to microsoft.public.excel.misc
blueju
 
Posts: n/a
Default ss:Formula in excel saved in xml format

I am struggling with the same problem at the moment, Excel doesn't seem
to like A1 style references in XML, you can use R1C1 + R2C1 though i.e.
absolute addressing rather than relative but it only seems to like the
R1C1 style, hope this helps. Please post back if you resolve the A1
style referencing.

  #3   Report Post  
Posted to microsoft.public.excel.misc
m_karbala
 
Posts: n/a
Default ss:Formula in excel saved in xml format


I am creating the this xml file using the c#. I have my formula saved in
onother xml file, and my code use those formula and some other info to
create the xml file. Changing formula to absolute addressing make them
absolute formula like $A$1+$B$2. I dont want this. I want A1+A2.



--
m_karbala
------------------------------------------------------------------------
m_karbala's Profile: http://www.excelforum.com/member.php...o&userid=27555
View this thread: http://www.excelforum.com/showthread...hreadid=507287

  #4   Report Post  
Posted to microsoft.public.excel.misc
Chris Allison
 
Posts: n/a
Default ss:Formula in excel saved in xml format

Like BlueJu and yourself, I am grapppling with a very similar problem.

One idea is that if you are generating the xml file in c, and you always
want to import to the same starting point, you should be able to work out
where you are in the loop and therefore where the absolute reference should
be.

My problem is that I cant figure out how to actually import a formula, full
stop. When I do I end up with a cell that is formatted as text, not in a
general format that automatically calculates my formulas.

"m_karbala" wrote:


Hi,
I have a have a excel file in XML format. In the first cell I want to
have a exact formula not a reference formula, meaning instead of
formula="=RC[1]+R[1]C[2]" I want it to be formula="=A1+B1". Is there
anybody how can help me in this case?

Here is the file. You just need to save it as xml and open it with the
excel.
<?xml version="1.0"?
<?mso-application progid="Excel.Sheet"?
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40"
<Styles
<Style ss:ID="Default" ss:Name="Normal"
</Style
</Styles
<Worksheet ss:Name="Sheet1"
<Table
<Row
<Cell ss:Formula="=RC[1]+R[1]C[2]"
</Cell
</Row
</Table
</Worksheet
</Workbook


--
m_karbala
------------------------------------------------------------------------
m_karbala's Profile: http://www.excelforum.com/member.php...o&userid=27555
View this thread: http://www.excelforum.com/showthread...hreadid=507287


  #5   Report Post  
Posted to microsoft.public.excel.misc
m_karbala
 
Posts: n/a
Default ss:Formula in excel saved in xml format


Hi,

I can think of 2 cases:
1- If you have your formula in the <dataType="string"""your formula""
</Data element then it will be appear as a string.
2- If you have it as a ss:formula then check your styles. It is
possible that in you style the format of the cell is text. Even thought
it will give you an error and won’t show your formula at all in excel.


--
m_karbala
------------------------------------------------------------------------
m_karbala's Profile: http://www.excelforum.com/member.php...o&userid=27555
View this thread: http://www.excelforum.com/showthread...hreadid=507287



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Date Format - users should be able to override it automatic. jamezog Excel Discussion (Misc queries) 7 May 20th 10 02:45 PM
Excel keeps crashing when I try to format any cells? AFlatt Excel Discussion (Misc queries) 21 November 16th 05 06:54 PM
Problems using Excel 2000 to open/save file saved in Excel 2003 [email protected] Excel Discussion (Misc queries) 1 June 29th 05 02:50 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel enters date as a text format Kane Excel Discussion (Misc queries) 3 March 22nd 05 09:20 PM


All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"