silvano Posted January 15, 2009 Share Posted January 15, 2009 (edited) hello, who is the best solution to print in landascape a table of data DB like img attached? give me a link or example please thanks by Edited January 15, 2009 by silvano Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 up please Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 up please Hey why don't you print from the cmd prompt?? PRINT [/D:device] [[drive:][path]filename[...]] /D:device Specifies a print device you can easily automate this using the @comspec macro in autoit [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 Hey why don't you print from the cmd prompt?? PRINT [/D:device] [[drive:][path]filename[...]] /D:device Specifies a print device you can easily automate this using the @comspec macro in autoit If this doesn't work, try the _fileprint UDF in autoit. Search for it in help. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 thanks i have search in the forum and i have look _fileprint and _word udf... but my problems are: 1) set orientation (no problem with _word udf) 2) print table cells (problem for me...) but if i use _word udf without office does not print nothing Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 thanks i have search in the forum and i have look _fileprint and _word udf... but my problems are:1) set orientation (no problem with _word udf)2) print table cells (problem for me...)but if i use _word udf without office does not print nothingok what format file r u trying to print?.doc, .jpg,.xlswhich 1 [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 Have u gone thru this?http://www.autoitscript.com/forum/index.php?showtopic=14223read the post there by james3mg [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 the better one formed would not have that legacy to programs it is possible to print a format as in the attached image without to use word or excel? and if i use excel i don't know like printing the table cells Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 the better one formed would not have that legacy to programsit is possible to print a format as in the attached image without to use word or excel?and if i use excel i don't know like printing the table cellsU cannot use excel and word UDFs without MSOffice installed.u can print image files(just like the one in ur attachment) in cmd line. the UDF for excel, doesn't include printing cells functions.n if u want to insert a table in word and then print it, u can do it by _worddocprint, there u can set the orientation n everything else too.but u'll need word installed for that.There can be another method too though I haven't tried it.U can print a csv file.just enter the information u want to enter in the cells, into a notepad file seperated by a comma and save it as .csv. the info seperated by ","will automatically get transfered into cells. n u just print this from cmd prompt.Simple n sweet. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 (edited) ok, the csv is the best solution... but i don't know to print table cells have you one little example? Edited January 16, 2009 by silvano Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 (edited) ok,the csv is the best solution... but i don't know to print table cellshave you one little example?See the post in which i have mentioned the usage of the print cmd in command prompt.Example (syntax in autoit)Run(@comspec & " /c print /d " & $printerName &" "& $file); $prinername is the device name of ur printer and $file is the path of ur csv or any other file u req to print.Simple n Sweet. Edited January 16, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 _FilePrint() or _PrintFile() not work fine for me... i have created a csv file like test.csv with: 1,2,3 one,two,three but the print func return a blank page Link to comment Share on other sites More sharing options...
Manjish Posted January 16, 2009 Share Posted January 16, 2009 _FilePrint() or _PrintFile() not work fine for me...i have created a csv file like test.csv with:1,2,3one,two,threebut the print func return a blank pageHey i am not sure about autoit's func fileprint(), coz i haven't used it. but u can definately use cmd prompt. just like the example i typed above. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
silvano Posted January 16, 2009 Author Share Posted January 16, 2009 the only way is to create the html file with table and cells and promt print preview thank you Link to comment Share on other sites More sharing options...
Manjish Posted January 18, 2009 Share Posted January 18, 2009 Oh gr8.. Thanks for the info man. n sorry my solution didn't work for u. But that's the beauty of brainstorming. U can't get to the right solution unless u go thru a million of wrong solutions. cheers, n ya if possible please send me the exact script, it cud be a handy 1. u can post it here, n ppl wud greatly benefit by it!! [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now