473,418 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 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 2542
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.