kamig Posted July 2, 2013 Posted July 2, 2013 is there any option to export is block to excel file and 2nd i have one excel file which is batter then this i mean updated one i want to bring that one in cad so how can i do that? test.dwg Quote
Sweety Posted July 2, 2013 Posted July 2, 2013 I am sorry , I don't think I follow you . Can you explain more ? Good day . Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 sweety did you open the drawing just look that 1st?? Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 It looks like kamig wants to bring his table from AutoCAD into Excel. Excel files can be linked with AutoCAD drawings via the Table command and the DataLink option. Quote
Sweety Posted July 2, 2013 Posted July 2, 2013 Select the table and right click then export to excel Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 You can export to a .CSV file not to a .XLS file. Quote
Sweety Posted July 2, 2013 Posted July 2, 2013 You can export to a .CSV file not to a .XLS file. What is the difference ? aren't they the same , I mean excel file . Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 if i export to a .CSV file then i have to rearange all the colum & cell Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 XLS is the native file type for an Excel spreadsheet. CSV is a comma delimited file. I believe one has to import a CSV file. Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 if i export to a .CSV file then i have to rearange all the colum & cell No, you don't. Quote
Sweety Posted July 2, 2013 Posted July 2, 2013 Kamig I see you have Water flow for the VAV , do you feed a VAV with water in the country you live or work in ? Does it work on Water or it needs water to run ? Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 Kamig I see you have Water flow for the VAV , do you feed a VAV with water in the country you live or work in ? Does it work on Water or it needs water to run ? I fail to see how this has anything to do with the question we're trying to answer. Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 Now i try .csv file but there is some formula i put that one not appear in .csv file so how can i update that one?? Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 yes sweety i am working in Saudi Arabia here we have VAV with Water Heater which is working fine? Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 see here i attached the excel file where only i have to in put the l/s then other will come auto if i want this same think in CAD is it possibal??? Book1.xls Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 You'll probably have to put the formula in manually. Quote
kamig Posted July 2, 2013 Author Posted July 2, 2013 i try but not working in cad which is on attached excel file Quote
ReMark Posted July 2, 2013 Posted July 2, 2013 Attached how? Is it an OLE object or did you create a Datalink? Quote
fixo Posted July 2, 2013 Posted July 2, 2013 Try this code to read Xl (defun C:XLRD (/ *error* GetXlRangeByMatch address filename sheetname x xlapp xlbook xldata xlrange) (vl-load-com) (defun *error* (msg) (if xlbook (vl-catch-all-apply 'vlax-invoke-method (list xlbook 'Close :vlax-false))) (gc) (if xlapp (vl-catch-all-apply 'vlax-invoke-method (list xlapp 'Quit))) (gc) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "\n--- Error: " msg " ---"))) ) ; Fatal error, display it (princ) ) (defun GetXlRangeByAddress(filename sheetname address / all_skvs xlbook xlrange xlsheet xlapp skv_records) (setq xlapp(vlax-get-or-create-object "Excel.Application")) (vla-put-visible xlapp :vlax-false) (vlax-put-property xlapp 'DisplayAlerts :vlax-false) (if (zerop (vlax-get-property(vlax-get-property xlapp 'workbooks) 'count)) (setq xlbook (vl-catch-all-apply 'vla-open (list (vlax-get-property xlapp 'WorkBooks) fileName) ) ) (setq xlbook (vl-catch-all-apply 'vlax-get-property (list xlapp 'activeworkbook)))) (setq xlsheet (vl-catch-all-apply 'vlax-get-property (list (vlax-get-property xlbook 'Sheets) 'Item 1 ;|"Sheet1" maybe|;;< --- sheet name or number ) ) ) (vlax-invoke-method xlsheet 'Activate) (setq xlrange (vlax-get-property (vlax-get-property xlsheet 'Cells) 'Range address)) (if (eq :vlax-true (vlax-variant-value(vlax-get-property xlrange 'HasFormula))) (setq xldata (vlax-get-property xlrange 'formulalocal)) (setq xldata(vlax-get-property xlrange 'value2))) (setq xldata (mapcar '(lambda(x)(mapcar 'vlax-variant-value x)) (vlax-safearray->list (vlax-variant-value xldata)))) (vl-catch-all-apply 'vlax-invoke-method (list xlbook 'close :vlax-false)) (vlax-put-property xlapp 'DisplayAlerts :vlax-true) (gc);; before QUIT (vl-catch-all-apply 'vlax-invoke-method (list xlapp 'quit)) (mapcar '(lambda(x)(if (and x (not (vlax-object-released-p x))) (progn(vlax-release-object x)(setq x nil)))) (list xlrange xlsheet xlbook xlapp)) (gc);; after QUIT xldata ) ;;___________________________ main part _____________________________________________;; ;; e.g.: (setq filename (findfile "C:\\blah\\blah\\blah.xls") sheetname 1 address "A3:E18") (setq xlData (GetXlRangeByAddress filename sheetname address)) (print xlData) ;;; --- rest your mojo here --- ;;; (*error* nil) (princ) ) (princ "\n\t\t---\tStart command with XLRD\t---") (prin1) (or (vl-load-com)(princ)) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.