472,958 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Need some help with compatability with Excel 2007

Folks,

Probably don't have the right forum here, but this is all a bit new to me. I have a web site that sends me a daily email with an excel spreadsheet attachment that contains some customer data. Sadly, now that I am using Excel 2007, I can't open the file for some reason. The code I am using to generate the file is below. Am I missing something obvious as it opens fine in Excel 2003. I am asking here as I think it's javascript, but I'm probably wrong on that one! Code below.

Any help much appreciated!

Thanks,

Nick
Expand|Select|Wrap|Line Numbers
  1. {startXml:h}
  2. <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
  3.  xmlns:o="urn:schemas-microsoft-com:office:office"
  4.  xmlns:x="urn:schemas-microsoft-com:office:excel"
  5.  xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
  6.  xmlns:html="http://www.w3.org/TR/REC-html40">
  7.  <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  8.  </DocumentProperties>
  9.  <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
  10.   <DownloadComponents/>
  11.  </OfficeDocumentSettings>
  12.  <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  13.   <WindowHeight>9345</WindowHeight>
  14.   <WindowWidth>11340</WindowWidth>
  15.   <WindowTopX>480</WindowTopX>
  16.   <WindowTopY>60</WindowTopY>
  17.   <ActiveSheet>0</ActiveSheet>
  18.   <ProtectStructure>False</ProtectStructure>
  19.   <ProtectWindows>False</ProtectWindows>
  20.  </ExcelWorkbook>
  21.  <Styles>
  22.   <Style ss:ID="Default" ss:Name="Normal">
  23.    <Alignment ss:Vertical="Bottom"/>
  24.    <Borders/>
  25.    <Font ss:FontName="Arial"/>
  26.    <Interior/>
  27.    <NumberFormat/>
  28.    <Protection/>
  29.   </Style>
  30.   <Style ss:ID="s21" ss:Name="Link">
  31.    <Font ss:FontName="Arial" ss:Color="#0000FF"
  32.     ss:Underline="Single"/>
  33.   </Style>
  34.   <Style ss:ID="s28">
  35.    <Font ss:FontName="Arial" ss:Bold="1"/>
  36.   </Style>
  37.   <Style ss:ID="s32">
  38.    <NumberFormat ss:Format="[$$-409]#,##0.00"/>
  39.   </Style>
  40.   <Style ss:ID="s35">
  41.    <NumberFormat ss:Format="Short Date"/>
  42.   </Style>
  43.   <Style ss:ID="s37">
  44.    <Font ss:FontName="Arial" ss:Bold="1"/>
  45.    <NumberFormat ss:Format="Short Date"/>
  46.   </Style>
  47.   <Style ss:ID="s39">
  48.    <Font ss:Bold="1"/>
  49.    <NumberFormat ss:Format="[$$-409]#,##0.00"/>
  50.   </Style>
  51.  </Styles>
  52.  <Worksheet ss:Name="customers">
  53.    <Table ss:ExpandedColumnCount="22" x:FullColumns="1" x:FullRows="1">
  54. <!--   <Row>
  55.     <Cell ss:StyleID="s28"><Data ss:Type="String">New customers</Data></Cell>
  56.    </Row>-->
  57.    <Row>
  58.     <Cell><Data ss:Type="String">Title</Data></Cell>
  59.     <Cell><Data ss:Type="String">First name</Data></Cell>
  60.     <Cell><Data ss:Type="String">Surname</Data></Cell>
  61.     <Cell><Data ss:Type="String">Billing company</Data></Cell>
  62.     <Cell><Data ss:Type="String">Billing phone</Data></Cell>
  63.     <Cell><Data ss:Type="String">Billing fax</Data></Cell>
  64.     <Cell><Data ss:Type="String">Billing address</Data></Cell>
  65.     <Cell><Data ss:Type="String">Billing city</Data></Cell>
  66.     <Cell><Data ss:Type="String">Billing state</Data></Cell>
  67.     <Cell><Data ss:Type="String">Billing country</Data></Cell>
  68.     <Cell><Data ss:Type="String">Billing zipcode</Data></Cell>
  69.     <Cell><Data ss:Type="String">Shipping company</Data></Cell>
  70.     <Cell><Data ss:Type="String">Shipping phone</Data></Cell>
  71.     <Cell><Data ss:Type="String">Shipping fax</Data></Cell>
  72.     <Cell><Data ss:Type="String">Shipping address</Data></Cell>
  73.     <Cell><Data ss:Type="String">Shipping city</Data></Cell>
  74.     <Cell><Data ss:Type="String">Shipping state</Data></Cell>
  75.     <Cell><Data ss:Type="String">Shipping country</Data></Cell>
  76.     <Cell><Data ss:Type="String">Shipping zipcode</Data></Cell>
  77.     <Cell><Data ss:Type="String">Contact mail</Data></Cell>
  78.     <Cell><Data ss:Type="String">Membership</Data></Cell>
  79.     <Cell><Data ss:Type="String">Membership expiry</Data></Cell>
  80.     <Cell><Data ss:Type="String">Vehicle regisration number</Data></Cell>
  81.     <Cell><Data ss:Type="String">Contact phone number</Data></Cell>
  82.    </Row>
  83.    <Row FOREACH="customers,c">
  84.     <Cell><Data ss:Type="String">{c.billing_title}</Data></Cell>
  85.     <Cell><Data ss:Type="String">{c.billing_firstname:t}</Data></Cell>
  86.     <Cell><Data ss:Type="String">{c.billing_lastname:t}</Data></Cell>
  87.     <Cell><Data ss:Type="String">{c.billing_company:t}</Data></Cell>
  88.     <Cell><Data ss:Type="String">{c.billing_phone:t}</Data></Cell>
  89.     <Cell><Data ss:Type="String">{c.billing_fax:t}</Data></Cell>
  90.     <Cell><Data ss:Type="String">{c.billing_address:t}</Data></Cell>
  91.     <Cell><Data ss:Type="String">{c.billing_city:t}</Data></Cell>
  92.     <Cell><Data ss:Type="String">{c.billingState.state:t}</Data></Cell>
  93.     <Cell><Data ss:Type="String">{c.billingCountry.country:t}</Data></Cell>
  94.     <Cell><Data ss:Type="String">{c.billing_zipcode:t}</Data></Cell>
  95.     <Cell><Data ss:Type="String">{c.shipping_company:t}</Data></Cell>
  96.     <Cell><Data ss:Type="String">{c.shipping_phone:t}</Data></Cell>
  97.     <Cell><Data ss:Type="String">{c.shipping_fax:t}</Data></Cell>
  98.     <Cell><Data ss:Type="String">{c.shipping_address:t}</Data></Cell>
  99.     <Cell><Data ss:Type="String">{c.shipping_city:t}</Data></Cell>
  100.     <Cell><Data ss:Type="String">{c.shippingState.state:t}</Data></Cell>
  101.     <Cell><Data ss:Type="String">{c.shippingCountry.country:t}</Data></Cell>
  102.     <Cell><Data ss:Type="String">{c.shipping_zipcode:t}</Data></Cell>
  103.     <Cell><Data ss:Type="String">{c.login}</Data></Cell>
  104.     <Cell><Data ss:Type="String">{c.pending_membership}</Data></Cell>
  105.     <Cell><Data ss:Type="String">{time_format(c.membership_exp_date)}</Data></Cell>
  106.     <Cell><Data ss:Type="String">{foreach:c.vehicles,v}   {v.vehicle_registration_number}   {end:}</Data></Cell>
  107.     <Cell><Data ss:Type="String">{foreach:c.vehicles,v}   {v.contact_phone_number}   {end:}</Data></Cell>
  108.     </Row>
  109.   </Table>
  110.   <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  111.    <PageSetup>
  112.     <PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
  113.      x:Right="0.78740157499999996" x:Top="0.984251969"/>
  114.    </PageSetup>
  115.    <Print>
  116.     <ValidPrinterInfo/>
  117.     <PaperSizeIndex>9</PaperSizeIndex>
  118.     <HorizontalResolution>600</HorizontalResolution>
  119.     <VerticalResolution>600</VerticalResolution>
  120.    </Print>
  121.    <Panes>
  122.     <Pane>
  123.      <Number>3</Number>
  124.      <ActiveRow>1</ActiveRow>
  125.      <ActiveCol>1</ActiveCol>
  126.     </Pane>
  127.    </Panes>
  128.    <ProtectObjects>False</ProtectObjects>
  129.    <ProtectScenarios>False</ProtectScenarios>
  130.   </WorksheetOptions>
  131.  </Worksheet>
  132. </Workbook>
  133.  
Jan 16 '08 #1
4 2518
acoder
16,027 Expert Mod 8TB
Welcome to The Scripts!

This is definitely not JavaScript. It looks like XML, so I'm moving it to the XML forum for now where hopefully someone will help you. Good luck!
Jan 17 '08 #2
jkmyoung
2,057 Expert 2GB
Where you have:
<Table ss:ExpandedColumnCount="22"

Change to
<Table ss:ExpandedColumnCount="24"

You have 24 columns (A-X), so Excel bugs out when you say you have less. Note. you can replace with anything at least 24. eg put 99 and it will work.
Jan 17 '08 #3
Thanks for the tip.

I also note that the file I receive is named 'customers.xls' when it is fact a .xml file. Any idea how I might change the extension to .xml for when the file is sent. Is the extension coded somewhere in their?

Thanks very much,

Nick
Jan 18 '08 #4
jkmyoung
2,057 Expert 2GB
Probably just rename the file, and remove the header
{startXml:h}
Jan 18 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: manmit.walia | last post by:
Hello Everyone, Long time ago, I posted a small problem I had about converting a VB6 program to C#. Well with the help with everyone I got it converted. But I overlooked something and don't...
0
by: Bill Fallon | last post by:
I am developing a VB.Net application with VS 2005 that opens an Excel workbook and populates the worksheet with data. I started developing the application with Office 2007 installed on my Vista...
11
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
0
by: silverear | last post by:
Hello everybody, I have written an application that is running as an Office project within Excel in C#. I created a setup project for my tool. When I install my program on a machine that has...
15
by: =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= | last post by:
Hi All, We are in the process of Upgrade Excel 2003 (Office 2003) to Excel 2007 (Office 2007) for one of web application. This web application is using Excel (Pivot Table) reports. With Excel...
2
budigila
by: budigila | last post by:
Hiya peeps, Okies, I have been trying to work this out for a while now to no avail... I am a beginner to this whole coding thing but have made great strides in my project. Basically what I am...
10
by: Bobby | last post by:
Hi, The organisation I work for is on the verge of buying Microsoft Office 2007 Pro Plus OLP NL. We currently use Office Pro 2003. Our business system is written in Access 2003 with a SQL Server...
5
by: LadyIlsebet | last post by:
I'm not a fantastic Access developer, but I'm trying to help get Inventory and whatnot organized at work. They are used to 5 year budget plans that list out exactly what has to be purchased what...
0
by: MBlock316 | last post by:
Hello everyone, I am trying to import a Microsoft Excel 2007 formatted file into my application. I found on another thread in another forum that I needed to install the 2007 Office System Driver:...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.