Karen, You can always copy the spreadsheet in question to a new one, such as SSToPrint.xls. Now, you can have your external code (Excel.bat file) with just the SSToPrint.xls name hard coded and don’t have to re-generate the “vCommand” variable or the Excel.bat file it every time, you just
LAUNCH Excel.bat then simply delete the new spreadsheet after use, and the name is ready to be used again. Javier Javier Valencia, PE 913-915-3137 From: 'Karen Tellef' via RBASE-L <[email protected]> Sent: Thursday, March 16, 2023 3:31 PM To: [email protected] Subject: Re: Re[4]: [RBASE-L] - Printing spreadsheets - got it to work! Boy that was easy!!! Here's my testing code. The single and double quotes are both required in the particular places so it's a bit tricky. My actual code will have complicated spreadsheet names with spaces, so I don't have that worked in yet. But this works. You see the command prompt box come up and it sits there for a few seconds, then you see Excel come up, load the file, print it and exit, so it's kinda weird seeing all that happen, but it does work. SET VAR vCommand = ('powershell -command "start-process -filepath ''test.xlsx'' -verb print" ') OUTPUT Excel.bat WRITE .vCommand=200 OUTPUT SCREEN LAUNCH Excel.bat||W Karen -----Original Message----- From: Bruce Chitiea <[email protected] <mailto:[email protected]> > To: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]> > Sent: Thu, Mar 16, 2023 3:18 pm Subject: Re[4]: [RBASE-L] - Printing spreadsheets It would appear that LAUNCH and Powershell are your friends, here. B Bruce A. Chitiea | SafeSectors, Inc. 112 Harvard Ave #272 | Claremont CA 91711-4716 | USA +011 (909) 238-9012 m | [email protected] <mailto:[email protected]> ------ Original Message ------ >From "'Karen Tellef' via RBASE-L" <[email protected] ><mailto:[email protected]> > To "[email protected] <mailto:[email protected]> " <[email protected] <mailto:[email protected]> > Date 3/16/2023 1:14:31 PM Subject Re: Re[2]: [RBASE-L] - Printing spreadsheets I guess I needed to be more clear. This is a random existing spreadsheet, has nothing to do with RBase at all Karen -----Original Message----- From: 'Jim Belisle' via RBASE-L <[email protected] <mailto:[email protected]> > To: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]> > Sent: Thu, Mar 16, 2023 2:10 pm Subject: RE: Re[2]: [RBASE-L] - Printing spreadsheets Karen, Try this. GATEWAY EXPORT XLSW + .. set up location of your file here ….xlsx + SELECT * FROM (table you created with the info) + OPTION COL_NAMES ON + |SHEET_INDEX 1 + |RAW_GEN ON + |BLANK_IF_NULL ON + |BLANK_IF_ZERO OFF + |SHOW_PROGRESS ON + |MERGE_DATA ON + |TAB_NAME ( name of tab in the workbook) This overwrites the info in the tab you are pointing to. I use this to add info to multiple tabs in one Excel book. James Belisle Making Information Systems People Friendly Since 1990 From: 'Karen Tellef' via RBASE-L <[email protected] <mailto:[email protected]> > Sent: Thursday, March 16, 2023 1:18 PM To: [email protected] <mailto:[email protected]> Subject: Re: Re[2]: [RBASE-L] - Printing spreadsheets CAUTION:This is an EXTERNAL EMAIL, STOP! and think before clicking on any links or opening attachments. This is an already existing spreadsheet, not printing a report to a spreadsheet format Karen -----Original Message----- From: Bruce Chitiea <[email protected] <mailto:[email protected]> > To: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]> > Sent: Thu, Mar 16, 2023 1:15 pm Subject: Re[2]: [RBASE-L] - Printing spreadsheets Have you considered: PRINT reportname ARRANGE clause WHERE clause .. ORDER BY clause .. OPTION XLSX (from RSyntax) Bruce Bruce A. Chitiea | SafeSectors, Inc. 112 Harvard Ave #272 | Claremont CA 91711-4716 | USA +011 (909) 238-9012 m | [email protected] <mailto:[email protected]> ------ Original Message ------ >From "'Karen Tellef' via RBASE-L" <[email protected] ><mailto:[email protected]> > To "[email protected] <mailto:[email protected]> " <[email protected] <mailto:[email protected]> > Date 3/16/2023 11:11:51 AM Subject Re: [RBASE-L] - Printing spreadsheets This will be a "batch" operation so we wouldn't want to launch them all right away. He claims it's "not a big deal unless it's easy to print them". I tried your first link, but get a "page not found" One place to explore solution: https://support.microsoft.com/en-us/office/command-line-switches-for-microsoft-office-products <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fcommand-line-switches-for-microsoft-office-products&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oUPA%2FN8l7DoDkilKLEqtVuvfxjt5is7qruAifYEEQMo%3D&reserved=0> Karen -----Original Message----- From: Bruce Chitiea <[email protected] <mailto:[email protected]> > To: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]> > Sent: Thu, Mar 16, 2023 1:08 pm Subject: Re: [RBASE-L] - Printing spreadsheets Karen: Just riffin' here. LAUNCH excel.exe gets you part of the way there, maybe One place to explore solution: https://support.microsoft.com/en-us/office/command-line-switches-for-microsoft-office-products <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fcommand-line-switches-for-microsoft-office-products&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oUPA%2FN8l7DoDkilKLEqtVuvfxjt5is7qruAifYEEQMo%3D&reserved=0> Another possible source: www.windows-commandline.com/run-command-for-excel/ <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.windows-commandline.com%2Frun-command-for-excel%2F&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PM%2BYUi%2BvA8ISn%2FvWvEtM3QZyf3zZoDyLJiAnP0I4pIs%3D&reserved=0> In the end PowerShell may be the solution. Bruce Bruce A. Chitiea | SafeSectors, Inc. 112 Harvard Ave #272 | Claremont CA 91711-4716 | USA +011 (909) 238-9012 m | [email protected] <mailto:[email protected]> ------ Original Message ------ >From "'Karen Tellef' via RBASE-L" <[email protected] ><mailto:[email protected]> > To "[email protected] <mailto:[email protected]> " <[email protected] <mailto:[email protected]> > Date 3/16/2023 10:38:20 AM Subject [RBASE-L] - Printing spreadsheets I've never been asked to do this before, and I have nothing in my voluminous notes.... Can you print an Excel spreadsheet (xlsx) from within your RBase app? Karen -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rbase.com%2Fsupport%2Fusersgroup_guidelines.php&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Hr%2FJ3ceFACSyDPecugdfSawTKYDDlh8hvly1NU8d2NM%3D&reserved=0> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/1537336721.947201.1678988300047%40mail.yahoo.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rbase.com%2Fsupport%2Fusersgroup_guidelines.php&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Hr%2FJ3ceFACSyDPecugdfSawTKYDDlh8hvly1NU8d2NM%3D&reserved=0> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/emacbf23ed-229c-4899-90df-4b055721892c%40a91e6852.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rbase.com%2Fsupport%2Fusersgroup_guidelines.php&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044548355%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Hr%2FJ3ceFACSyDPecugdfSawTKYDDlh8hvly1NU8d2NM%3D&reserved=0> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/618413864.106307.1678990311876%40mail.yahoo.com <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Frbase-l%2F618413864.106307.1678990311876%2540mail.yahoo.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044704551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wlGwMAzeITrU38ErYaZ3LmZkBuXP4wsFJBr6Xx5Hv28%3D&reserved=0> . -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rbase.com%2Fsupport%2Fusersgroup_guidelines.php&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044704551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fEJwq4NHQL0s9DwGMgwPpMg5BIg1aOncDNAH4Ycva1c%3D&reserved=0> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/em237796d7-7920-434d-a805-54da45a0b190%40a91e6852.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rbase.com%2Fsupport%2Fusersgroup_guidelines.php&data=05%7C01%7Cjim%40kaypark.com%7C64a5f0da25944c76363b08db264ad34b%7Cb1d6481668ef495ea1453b4a98d6a532%7C1%7C0%7C638145875044704551%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fEJwq4NHQL0s9DwGMgwPpMg5BIg1aOncDNAH4Ycva1c%3D&reserved=0> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/2002970857.945404.1678990697251%40mail.yahoo.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/IA1PR02MB8898A533605C11E46DFE637EA0BC9%40IA1PR02MB8898.namprd02.prod.outlook.com <https://groups.google.com/d/msgid/rbase-l/IA1PR02MB8898A533605C11E46DFE637EA0BC9%40IA1PR02MB8898.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer> . -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/1571449144.1014704.1678997671292%40mail.yahoo.com <https://groups.google.com/d/msgid/rbase-l/1571449144.1014704.1678997671292%40mail.yahoo.com?utm_medium=email&utm_source=footer> . -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/em345e156d-b6f5-4f7a-83cf-fbde5f372a09%408d4690e5.com <https://groups.google.com/d/msgid/rbase-l/em345e156d-b6f5-4f7a-83cf-fbde5f372a09%408d4690e5.com?utm_medium=email&utm_source=footer> . -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/1107224675.1021384.1678998682987%40mail.yahoo.com <https://groups.google.com/d/msgid/rbase-l/1107224675.1021384.1678998682987%40mail.yahoo.com?utm_medium=email&utm_source=footer> . -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/008e01d95876%241f298420%245d7c8c60%24%40vtgonline.com.

