<?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: Export Table in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776804#M139183</link>
    <description>&lt;P&gt;Hi Steve,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;as far as I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;know&lt;/SPAN&gt;, AutoCAD don't have a command line &lt;SPAN class="hps"&gt;version&lt;/SPAN&gt; from the 'tableexport' command, so we can´t bypass the dialog box calling the command from a .lsp file...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if the tables to export, are not &lt;EM&gt;'&lt;/EM&gt;&lt;SPAN class="hps"&gt;&lt;EM&gt;very complicated'&lt;/EM&gt; with cells merged... &lt;SPAN class="alt-edited"&gt;probably&lt;/SPAN&gt; we can write some Auto/Visual Lisp code to read each layout table and export to a .cvs file with the layout name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;If possible to you, post a sample .dwg (AC2010) with some sample tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Aug 2015 22:06:36 GMT</pubDate>
    <dc:creator>hmsilva</dc:creator>
    <dc:date>2015-08-18T22:06:36Z</dc:date>
    <item>
      <title>Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5775783#M139182</link>
      <description>&lt;P&gt;My original goal was&amp;nbsp;to export a table with the push of a button. I've looked at vba and lisp methods. However, I'm&amp;nbsp;struggling with identifying the table with any method. This is as close as I've made it. I want to name the exported file ( .csv ) as the current layout tab name. I&amp;nbsp;don't want to see the dialog box. When using the lisp below, I have to select the table first which I can live with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table&amp;nbsp;I export is a material list and I sometimes have as many as five tabs in one file I have to export. I would be fine with switching to each tab&amp;nbsp;in order to run this procedure. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have limited&amp;nbsp;experience with lisp and no&amp;nbsp;experience with&amp;nbsp;AutoCAD vba but, have used it with excel.&amp;nbsp;Would someone help&amp;nbsp;point me&amp;nbsp;in a better direction.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:tabx()
	(command "tableexport" "" "test.csv")
	(princ "\nTable Export Complete:")
	(princ)
) ;_end of defun&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 13:34:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5775783#M139182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-18T13:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776804#M139183</link>
      <description>&lt;P&gt;Hi Steve,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;as far as I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;know&lt;/SPAN&gt;, AutoCAD don't have a command line &lt;SPAN class="hps"&gt;version&lt;/SPAN&gt; from the 'tableexport' command, so we can´t bypass the dialog box calling the command from a .lsp file...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if the tables to export, are not &lt;EM&gt;'&lt;/EM&gt;&lt;SPAN class="hps"&gt;&lt;EM&gt;very complicated'&lt;/EM&gt; with cells merged... &lt;SPAN class="alt-edited"&gt;probably&lt;/SPAN&gt; we can write some Auto/Visual Lisp code to read each layout table and export to a .cvs file with the layout name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;If possible to you, post a sample .dwg (AC2010) with some sample tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 22:06:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776804#M139183</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-18T22:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776818#M139184</link>
      <description>&lt;P&gt;Here would be an example of the table (material list). I've only placed info in (1) table but it's common for us to use multiple sheets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 22:22:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776818#M139184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-18T22:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776877#M139185</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;
&lt;P&gt;the&amp;nbsp;layout have two tables, we have to find a way to &lt;SPAN class="hps"&gt;choose the&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;highest/larger one, and the table have also some string &lt;SPAN class="hps"&gt;formatting, we have to deal with that too...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps alt-edited"&gt;&lt;SPAN class="hps"&gt;Today I have a deadline to meet, so tomorrow, I'll see &lt;SPAN class="hps"&gt;what I can do&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps alt-edited"&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 23:14:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776877#M139185</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-18T23:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776903#M139186</link>
      <description>&lt;P&gt;I would suggest looking at this thread on theswamp.org:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=44382.msg496519#msg496519" target="_blank"&gt;http://www.theswamp.org/index.php?topic=44382.msg496519#msg496519&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 23:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5776903#M139186</guid>
      <dc:creator>chriswade</dc:creator>
      <dc:date>2015-08-18T23:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5778684#M139187</link>
      <description>&lt;P&gt;Hi Steve,&lt;BR /&gt;attached is a 'quick and dirty' code, to export the larger (with more columns) table in a tab 'tbl-export', and to export the larger (with more columns) table in all layout tabs 'tbls-export'.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The code uses as sub-function, &lt;A href="http://lee-mac.com/unformatstring.html" target="_blank"&gt;Lee Mac's UnFormat String&lt;/A&gt; to remove the MText formatting codes from the text strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code was very little tested, so try it, and if you find something that does not work as expected, say something...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 21:39:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5778684#M139187</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-19T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780558#M139188</link>
      <description>&lt;P&gt;That's so close! I've attached a screen shot showing the result I get when I export manually which is my goal except with the luxury of automation. The righthand side of the image is the result of the current lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on your code and the the above links I may need to do some homework.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 18:30:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780558#M139188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-20T18:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780586#M139189</link>
      <description>&lt;P&gt;The problem is the seperators are set as ; in the code when they they should be ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the attached version instead, it worked well in my test.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 18:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780586#M139189</guid>
      <dc:creator>chriswade</dc:creator>
      <dc:date>2015-08-20T18:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780670#M139190</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;That's so close! I've attached a screen shot showing the result I get when I export manually which is my goal except with the luxury of automation. The righthand side of the image is the result of the current lisp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your code and the the above links I may need to do some homework.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Steve and &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/522900"&gt;@chriswade&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I did tested the code, in 'Excel 2007', and the seperators as &lt;SPAN class="hps"&gt;semicolon&lt;/SPAN&gt;s&amp;nbsp;';' were &lt;SPAN class="hps"&gt;recognized without&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;issues...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps alt-edited"&gt;&lt;IMG title="Table2Excel.PNG" alt="Table2Excel.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/184596i73741D692B00BA03/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:05:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780670#M139190</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-20T19:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780673#M139191</link>
      <description>&lt;P&gt;In 2010, the ; isn't recognized as a separator for some reason, only the , is.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:07:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780673#M139191</guid>
      <dc:creator>chriswade</dc:creator>
      <dc:date>2015-08-20T19:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780685#M139192</link>
      <description>&lt;P&gt;If I start saving in newer formats will I have to use a different separator?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:13:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780685#M139192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-20T19:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780714#M139193</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/522900"&gt;@chriswade&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;In 2010, the ; isn't recognized as a separator for some reason, only the , is.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have 'Excel 2010' in this old laptop, but 'Excel' &lt;SPAN class="hps"&gt;allows us to choose the separator type, when we import 'text' data into a spreadsheet...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Open Excel&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Data tab &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;From text&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;select the file&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;delimited, the fields are delimited &lt;SPAN class="hps"&gt;by commas&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;or tabs,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;next&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;This separator allows us to choose the separator type, or tabs, semicolon, colon, space or other...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:27:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780714#M139193</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-20T19:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780893#M139194</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;If I start saving in newer formats will I have to use a different separator?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Steve and &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/522900"&gt;@chriswade&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the &lt;SPAN class="hps"&gt;quickly&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;written &lt;/SPAN&gt;code I've posted, was tested in a laptop &lt;SPAN class="hps"&gt;with&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the language set to Português, and the separator is defined at the the Registry / International, so the &lt;SPAN class="hps alt-edited"&gt;following&lt;/SPAN&gt; revised code, should work as expected, in any language...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 20:37:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/5780893#M139194</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-08-20T20:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/8735987#M139196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this lisp works great. thank to you.&lt;/P&gt;
&lt;P&gt;a small query,&lt;/P&gt;
&lt;P&gt;do it export the multiple table in same layout ? could it possible any way to implement in lisp?&lt;/P&gt;
&lt;P&gt;but i can manage with lisp for merging the tables.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 04:06:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/8735987#M139196</guid>
      <dc:creator>pradeepgds</dc:creator>
      <dc:date>2019-04-17T04:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/8838718#M139197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i need a small help. i need to export the layout name to excel sheet.&lt;/P&gt;&lt;P&gt;i got the lisp, but its gives the result that, opening the excel instead of that the excel need to be saved on the same directory of cad file like tbls-export.lsp&lt;/P&gt;&lt;P&gt;below the lisp program, can u modify and send if possible plz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun bbox:exportlayout (dwgs / *error* bbox:getdate bbox:gettime bbox:writedata&lt;BR /&gt;acapp odocuments oshell path filepath dbxdoc file&lt;BR /&gt;opendoc olayouts layoutname)&lt;BR /&gt;(vl-load-com)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun *error* (msg)&lt;BR /&gt;(if file (close file))&lt;BR /&gt;(if oshell (vlax-release-object oshell))&lt;BR /&gt;(if dbxdoc (vlax-release-object dbxdoc))&lt;BR /&gt;(cond ((not msg))&lt;BR /&gt;((member msg '("Function cancelled" "quit / exit abort")))&lt;BR /&gt;((princ (strcat "\n** Error: " msg " ** ")))&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun bbox:getdate (date)&lt;BR /&gt;(setq date (mapcar '(lambda (x) (itoa x)) date))&lt;BR /&gt;(strcat (nth 0 date) "-" (nth 1 date) "-" (nth 3 date))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun bbox:gettime (date / hr mn)&lt;BR /&gt;(setq hr (nth 4 date))&lt;BR /&gt;(setq mn (itoa (nth 5 date)))&lt;BR /&gt;(if (= 1 (strlen mn))&lt;BR /&gt;(setq mn (strcat "0" mn))&lt;BR /&gt;)&lt;BR /&gt;(cond ((&amp;gt; 12 hr) (strcat (itoa hr) ":" mn " AM"))&lt;BR /&gt;((strcat (itoa (- hr 12)) ":" mn " PM"))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun bbox:writedata (dwg layoutname file / filepath date)&lt;BR /&gt;(write-line&lt;BR /&gt;(vl-string-right-trim&lt;BR /&gt;","&lt;BR /&gt;(apply&lt;BR /&gt;'strcat&lt;BR /&gt;(mapcar&lt;BR /&gt;'(lambda (x) (strcat x ","))&lt;BR /&gt;(list (setq filepath (strcat dwg))&lt;BR /&gt;(if (setq date (vl-file-systime filepath))&lt;BR /&gt;(bbox:getdate date)&lt;BR /&gt;""&lt;BR /&gt;)&lt;BR /&gt;(if date&lt;BR /&gt;(bbox:gettime date)&lt;BR /&gt;""&lt;BR /&gt;)&lt;BR /&gt;layoutname&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;file&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(if (and (setq acapp (vlax-get-acad-object))&lt;BR /&gt;(setq odocuments (vla-get-documents acapp))&lt;BR /&gt;(setq oshell (vla-getinterfaceobject acapp "Shell.Application"))&lt;BR /&gt;(setq path (car dwgs))&lt;BR /&gt;(setq filepath (strcat (vl-filename-directory (vl-filename-mktemp))&lt;BR /&gt;"\\Export Layout Report_"&lt;BR /&gt;(getvar 'DWGNAME)"_"(menucmd "M=$(edtime,$(getvar,date),DD-MO-YYYY)")&lt;BR /&gt;".csv"&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ "\nWorking, please wait...")&lt;BR /&gt;(princ)&lt;BR /&gt;(setq dbxdoc (vla-getinterfaceobject acapp (strcat "ObjectDBX.AxDbDocument." (substr (getvar 'acadver) 1 2))))&lt;BR /&gt;)&lt;BR /&gt;(progn&lt;BR /&gt;(setq file (open filepath "w"))&lt;BR /&gt;(write-line "Directory Searched:" file)&lt;BR /&gt;(write-line path file)&lt;BR /&gt;(write-line "" file)&lt;BR /&gt;(write-line "Drawing Name: , ******** , ******** ,Layout Name:" file)&lt;BR /&gt;(foreach dwg dwgs ; edited here (cdr dwgs)&lt;BR /&gt;(if (not (vl-catch-all-error-p&lt;BR /&gt;(setq opendoc (vl-catch-all-apply&lt;BR /&gt;'vla-item&lt;BR /&gt;(list odocuments dwg)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(setq olayouts (vla-get-layouts opendoc))&lt;BR /&gt;(progn&lt;BR /&gt;(vl-catch-all-apply&lt;BR /&gt;'vla-open&lt;BR /&gt;(list dbxdoc dwg) ;edited here (strcat path dwg)&lt;BR /&gt;)&lt;BR /&gt;(setq olayouts (vla-get-layouts dbxdoc))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(vlax-for olayout olayouts&lt;BR /&gt;(if (/= "Model" (setq layoutname (vla-get-name olayout)))&lt;BR /&gt;(bbox:writedata (getvar 'DWGNAME) layoutname file) ; Edited (bbox:writedata path dwg layoutname file&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ "Done.")&lt;BR /&gt;(princ)&lt;BR /&gt;;(setq file (close file)) ;Abra-CAD-Abra&lt;BR /&gt;(vlax-invoke oshell 'open filepath)&lt;BR /&gt;(*error* nil)&lt;BR /&gt;)&lt;BR /&gt;(cond&lt;BR /&gt;(filepath (*error* "Unable to create \"ObjectDBX.AxDbDocument\" Object"))&lt;BR /&gt;(acapp (*error* "Unable to create \"Shell.Application\" Object"))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun c:el (/ opt dwgs)&lt;/P&gt;&lt;P&gt;(defun str2lst (str sep / len lst)&lt;BR /&gt;(setq len (strlen sep))&lt;BR /&gt;(while (setq pos (vl-string-search sep str))&lt;BR /&gt;(setq lst (cons (substr str 1 pos) lst)&lt;BR /&gt;str (substr str (+ len pos 1))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(reverse (cons (substr str 1 pos) lst))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(initget "Enter")&lt;BR /&gt;(if (not (setq opt (getkword "\nPress Enter if you would like to process Active Drawing: &amp;lt;Enter&amp;gt; ")))&lt;BR /&gt;(setq opt "Enter")&lt;BR /&gt;)&lt;BR /&gt;(cond&lt;BR /&gt;((= "Enter" opt) (if (= 1 (getvar 'dwgtitled))&lt;BR /&gt;(bbox:exportlayout (list (getvar 'dwgprefix) (getvar 'dwgname)))&lt;BR /&gt;(prompt "\n** Drawing not saved ** ")&lt;BR /&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(princ)&lt;BR /&gt;)&lt;BR /&gt;(c:el)&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 12:49:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/8838718#M139197</guid>
      <dc:creator>pradeepgds</dc:creator>
      <dc:date>2019-06-07T12:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13428797#M139198</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I used&amp;nbsp;tbl-export.lsp and it is working grate.&lt;/P&gt;&lt;P&gt;I need to set the second column width to 20 and all the rows hight to 10.&lt;/P&gt;&lt;P&gt;I tried to set it in the "hms:export_table_" function using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vla-setcolumnwidth tabl 2 20)
(vla-SetRowHeight tabl row 10)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but it didn't work.&lt;/P&gt;&lt;P&gt;how can I set the column and rows size?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;aridzv.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 11:07:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13428797#M139198</guid>
      <dc:creator>aridzv</dc:creator>
      <dc:date>2025-04-16T11:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13428856#M139199</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3981970"&gt;@aridzv&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think you are missing some here,&amp;nbsp;tbls-export auto select all tables and export them to csv file.&lt;/P&gt;&lt;P&gt;i recommend open a new thread and and post a sample dwg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 11:39:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13428856#M139199</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-04-16T11:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13430053#M139200</link>
      <description>&lt;P&gt;This is export to excel a table maybe start again. You would have to add a loop for multiple tables, if located in layouts or Model. Load multi toggles 1st.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 00:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13430053#M139200</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-04-17T00:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13438211#M139201</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;following this&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-export-table-from-autocad-to-excel/td-p/10930210" target="_blank" rel="noopener"&gt;topic&lt;/A&gt;&lt;/STRONG&gt; I managet to get "table to excel.lsp" to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;;;;;;;;;;;;;;;;;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-export-table-from-autocad-to-excel/td-p/10930210;;;;;;;;;;;;;;;
; simple table to excel
; expects Title header and data
; BY Alanh Jan 2022
; do not have excel open

(defun c:tab2excel_v1 ( /  x y z AH:putcell Ah:opennew number2alpha obj cols row)

(defun AH:putcell (cellname val1 / )
(setq myRange (vlax-get-property  (vlax-get-property myxl "ActiveSheet") "Range" cellname))
(vlax-put-property myRange 'Value2 val1)
)

(defun AH:opennew ( /  )
(if (= (setq myxl (vlax-get-object "Excel.Application") ) nil)
(setq myxl (vlax-get-or-create-object "excel.Application"))
)
(vla-put-visible myXL :vlax-true)
(vlax-put-property myxl 'ScreenUpdating :vlax-true)
(vlax-put-property myXL 'DisplayAlerts :vlax-true)
)

; Number2Alpha - Converts Number into Alpha string
; Function By: Gilles Chanteau from Marseille, France
; Arguments: 1
;   Num# = Number to convert
; Syntax example: (Number2Alpha 731) = "ABC"
;-------------------------------------------------------------------------------
(defun Number2Alpha (Num# / Val#)
  (if (&amp;lt; Num# 27)
    (chr (+ 64 Num#))
    (if (= 0 (setq Val# (rem Num# 26)))
      (strcat (Number2Alpha (1- (/ Num# 26))) "Z")
      (strcat (Number2Alpha (/ Num# 26)) (chr (+ 64 Val#)))
    )
  )
);defun Number2Alpha

(AH:opennew)
(vlax-invoke-method (vlax-get-property myXL 'WorkBooks) 'Add)

(setq obj (vlax-ename-&amp;gt;vla-object (car  (entsel "Pick table "))))
(setq cols (vla-get-columns obj))
(setq rows (vla-get-rows obj))
(alert (strcat (rtos rows 2 0) " rows " (rtos cols 2 0) " columns \n will now send to excel "))

(AH:putcell "A1" (vla-getText Obj 0 0 ))

(setq x 1 y 1 z 1)
;(repeat cols
;(AH:putcell (strcat (Number2Alpha x) (rtos z 2 0)) (vla-getText Obj y (- x 1)  ))
;(setq x (1+ x))
;)

(alert (itoa rows))
(setq y 1)
(repeat rows ;(- rows 2)
  (setq x 1 )
  (repeat cols
    (AH:putcell (strcat (Number2Alpha x) (rtos y 2 0)) (vla-getText Obj (- y 1) (- x 1)  ))
    ;(alert (vla-getText Obj y (- x 1)  ))
    (setq x (1+ x))
    (princ (strcat "\nRow " (rtos y 2 0)))
  )
  (setq y (1+ y))
)

(vlax-release-object myXL)
(alert "Please save the excel and close if you want to import another table ")

(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now,&lt;/P&gt;&lt;P&gt;my table contains "image in cell" (see attached dwg).&lt;/P&gt;&lt;P&gt;with the current code the images are not exported,only text.&lt;/P&gt;&lt;P&gt;is there a way to export the images as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;aridzv.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 23:17:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13438211#M139201</guid>
      <dc:creator>aridzv</dc:creator>
      <dc:date>2025-04-22T23:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Export Table</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13438291#M139202</link>
      <description>&lt;P&gt;You have a very extensive answer here "&lt;A href="https://www.cadtutor.net/forum/topic/97450-export-table-with-blocks-to-excel-with-python/page/4/" target="_blank"&gt;export table with blocks to excel with Python - .NET, ObjectARX &amp;amp; VBA - AutoCAD Forums&lt;/A&gt;" why post again ?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 00:48:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/export-table/m-p/13438291#M139202</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-04-23T00:48:36Z</dc:date>
    </item>
  </channel>
</rss>

