Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML for Excel - Date Function showing serial

Status
Not open for further replies.

WaterTight

Programmer
Nov 11, 2001
19
0
0
US
Using an XML for excel - have the following code:

Code:
<?xml version="1.0" encoding="utf-8"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="[URL unfurl="true"]http://www.w3.org/TR/REC-html40">[/URL]
  <Worksheet ss:Name="Sheet1">
    <Table>
      <Row>
        <Cell ss:Formula="=TODAY()"></Cell>
      </Row>
    </Table>
  </Worksheet>
</Workbook>

The problem is that when I open the file with Excel, the serial number appears instead of the date time. I've tried specifying <Cell ss:Formula="=TODAY()" Type="DateTime"> but it doesn't seem to like that either.

If I edit the cell in Excel - and just hit Enter, it formats it correctly. Is there a way to force formatting when the file is opened?

thanks,
J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top