<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating Excel File for Different Versions in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5774952#M38932</link>
    <description>&lt;P&gt;Ok I tried something else today and it seems to be working.&lt;/P&gt;&lt;P&gt;Originally, in the References I used Microsoft Excel 14.0 Object Library (14 = 2010, 15= 2013) from the COM tab.&lt;/P&gt;&lt;P&gt;&lt;IMG title="Ref_Excel_COM.jpg" alt="Ref_Excel_COM.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/183911i2F9F85A28E1E166B/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I removed that and replaced it with Microsoft Office Interop Excel from the .Net tab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Ref_Excel_Net.jpg" alt="Ref_Excel_Net.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/183912i1095AAD0379FD618/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saved it and it ran just fine without format/extension issue.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2015 22:21:49 GMT</pubDate>
    <dc:creator>mgorecki</dc:creator>
    <dc:date>2015-08-17T22:21:49Z</dc:date>
    <item>
      <title>Creating Excel File for Different Versions</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772034#M38928</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My program will output to a new Excel file.&amp;nbsp; I have Microsoft 2013 and 2010 installed on my computer.&amp;nbsp; There are people in my company that only have 2010, so I need to be able to output to 2010.&lt;/P&gt;&lt;P&gt;In the references, I have added:&lt;/P&gt;&lt;P&gt;Microsoft Excel 14.0 Object Library&lt;/P&gt;&lt;P&gt;Microsoft Office 14.0 Object Library&lt;/P&gt;&lt;P&gt;(14.0 = version 2010)&lt;/P&gt;&lt;P&gt;In my code I have used "Object" instead of Excel.Workbook as I read in another forum I have to do that for this to work in&amp;nbsp;older versions of Excel.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Dim&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; xlApp &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;As&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Object&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; xlWkBook &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; xlWkSheet &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;'Dim colorRange As Range - can't use it currently&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;'Open Excel application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;xlApp = CreateObject(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"Excel.Application"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;'Make sure excel is visible and add a new workbook&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;xlApp.Visible = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;xlWkBook = xlApp.Workbooks.Add&lt;/P&gt;&lt;P&gt;xlWkSheet = xlApp.ActiveSheet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem happens when the file is saved and I double pick the file to open it, it tells me that the file format and the extension don't match.&amp;nbsp; I pick "Yes" to open it anyway and it opens just fine.&amp;nbsp; Is there any way to get around this warning message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 18:07:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772034#M38928</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2015-08-14T18:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Excel File for Different Versions</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772156#M38929</link>
      <description>&lt;P&gt;Check if the file is a xls or an xlsx.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rename the file to .zip and unzip the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a few files then it's an xls&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;otherwise if there are multiple folders it's an xlsx file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/183600iD91FFB719CEA8AF1/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="xlsImage.jpg" title="xlsImage.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 19:27:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772156#M38929</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2015-08-14T19:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Excel File for Different Versions</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772304#M38930</link>
      <description>&lt;P&gt;ok, it looks like its an .xlsx.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 21:26:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5772304#M38930</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2015-08-14T21:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Excel File for Different Versions</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5773082#M38931</link>
      <description>&lt;P&gt;Without the code, it seems like the problem is being caused by having the file name extension set as .xls when the file format is actually the new .xlsx type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest changing the file extension you are passing to match the file format you are creating/saving as.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2015 12:13:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5773082#M38931</guid>
      <dc:creator>andrewpuller3811</dc:creator>
      <dc:date>2015-08-16T12:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Excel File for Different Versions</title>
      <link>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5774952#M38932</link>
      <description>&lt;P&gt;Ok I tried something else today and it seems to be working.&lt;/P&gt;&lt;P&gt;Originally, in the References I used Microsoft Excel 14.0 Object Library (14 = 2010, 15= 2013) from the COM tab.&lt;/P&gt;&lt;P&gt;&lt;IMG title="Ref_Excel_COM.jpg" alt="Ref_Excel_COM.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/183911i2F9F85A28E1E166B/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I removed that and replaced it with Microsoft Office Interop Excel from the .Net tab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Ref_Excel_Net.jpg" alt="Ref_Excel_Net.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/183912i1095AAD0379FD618/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saved it and it ran just fine without format/extension issue.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 22:21:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/creating-excel-file-for-different-versions/m-p/5774952#M38932</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2015-08-17T22:21:49Z</dc:date>
    </item>
  </channel>
</rss>

