foxidrive wrote:shaswat,
If you provide the files and data and show what you need with examples, then it makes it simpler to know what you want to do and also to provide reliable code that will work in your exact situation.
Hi Guys,
Sorry for the delayed reply. I was busy in this task and tried something. It can change the .xlsm file to .CSV file but the output is complete garbage. I am attaching the code code and the input values and the garbage output that I got. Please guys help in out in solving this .
VBS Script to convert the .xlsm file to .CSV file
Code: Select all
'launch Excel and open file
Set xlObj = CreateObject("Excel.Application")
xlObj.Workbooks.Open("C:\test\excel.xlsm")
xlObj.Activeworkbook.SaveAs "C:\test\excelC.csv"
xlObj.Activeworkbook.Close
xlObj.Quit
Batch Script to call the VBS Script
Code: Select all
:Start
@Echo off
CScript testexcel.vbs
pause
:End
My Input Excel file format is: Microsoft Excel Macro-Enabled Worksheet (.xlsm)
My Output file format requirement is : .CSV
Input file values:
Name Brand Name Date
Shaswat L 1/0/1900
But after converting it to .CSV file the output I am getting is complete Garbage.
Output:
PK ! •ÕôEµ b [Content_Types].xml ¢( ÌUÉnÛ0½è?¼"´(ŠÂrizl$ý€19¶XS$Á™¸ößw$'éǪÍE‚HÍ[¸¼™^lºP±O±Qgz¢*Œ69—úvû¹þ *bˆBŠØ¨-’º˜½~5½Ýf¤Jª#5ªeÎ!Ûb¤SÆ(3‹T:`ù,K“Á®`‰æ|2yolŠŒ‘kî1Ôlú p¸ºÚÈðNÉÜGU]îþë©9oE¨YG÷IoÑ%{× ´¦\µˆÜ‹ÆrƒÌbŒ”ÙËY0Ðq¤÷®´T¨õ™Þˆõ'ú™§]Ý×}•í(Þau
…¿@'ÞÍ&˜©¬æ)ôa~i:ªqc1èÁ¿îÀ–taPæÀÇ…˜†J2Ãëì(ÿÜòûÑ;€ÔqþBt¼}!:Þý',·Íð|þÑ`Fñ6 ØítŒ¹…‚î†%?–'ð;öˆÁ^¶ruO¼¸#üë9\—ô-ëñd–øÙ¥±þUÖ⾸‘ÀàLÒ
oî!€ûê:öøÁ¥¡<{5±ïXÝn3tÈÙO ÿÿ PK ! µU0#ô L _rels/.rels ¢( ¬’MOÃ0†ïHü‡È÷ÕÝBKwAH»!T~€Iܵ£$Ý¿'TƒG½~üÊÛÝ<êÈ!öâ4¬‹;#¶w†—úqu*&r–Fq¬áÄvÕõÕö™GJy(v½*«¸¨¡KÉß#FÓñD±Ï.W ¥†=™ZÆMYÞbø®ÕBS톰·7 ê“Ï›×–¦é
?ˆ9LìÒ™ÈsbgÙ®|Èl!õùUSh9i°bžr:"y_dlÀóD›¿ý|-NœÈR"4ø2ÏGÇ% õZ´4ñËyÄ7 ëÈðÉ‚‹¨Þ ÿÿ PK ! ×êDm? ` xl/_rels/workbook.xml.rels ¢( ¼”MOÃ0†ïHü‡*wš¶ãCkw !í†`ü€,u?X›Tqôßc©Ý¤.\ª^"ÙQÞ÷‘{½ù©+ïKbúó@I–*ÙÇîåæžyh…JE¥Ä¬d›äújý•°ô‹²ATƬ°¶yäeµ@_7 è&Ó¦–B“óFȃÈGA°âæTƒ%gšÞ6™Ù¦ä¿krþ_[gY)áY˯”±àRTò©¥"Qar°1ëS>‘2>±˜â[› v€èSÈ»›…ænJ,„ôÝj8@giL4se"L83Lè‚YMÚ&ÛV4yý¯Å.vÙßNioižapïBÞÎ,gîÇÒU‡0u)FY_êšÿí±ÝqÜ‹W£?AžÌíó÷´Th{𳽘ü ÿÿ PK ! !…+è † xl/workbook.xml¤WQs¢H~¿ªû„óÕ hô´Ô-L¨Uq“ËÕVQ#Œq*À¸0n’ººÿ~= Y‚{%‹/âô×_÷×ÝÃO¯Q(|ÇIJh<åë–(àا‰ŸFâÊ6ÿ…”¡8@!ñH|éøiüûoÚ<¯)} NGâ–±Ý@’R‹#”^ÓŽáΆ&b°Lž¤t—`¤[ŒYJJ«Õ•"Db1G$U0èfC|¬Sá˜å úé–ìÒ#ZäW‹Pò¼ß5}í bMBÂÞ2PQˆüùÓCûU¾9"Ãßèˆø Mé†]””“<‰WnI²œ‡<nHˆïó´h·[ ˆ{ E!D)3Âp0»°¤/øÇHö»Éž„pWîtĹù?=UÑ{F¿ÛìíN³#÷Õ¦jÜL›J¿;i«=£×ïõþ¥ñ»xˤ`înIúpPU¼Aû¹ ç‘(¸T:ŠÒå5d8‰Ã¨qÐñÒÌgØÚ–‚΂¿íI‚¡¼¸ ã!ü"€Öé±°O‘¨
¾2ÈÐׂ<èTû_ù<> ÌIäÿËÁŽ‡¼øï ~I¤“/…×ôe$*Pçí¸’o`õ’Ýz ÛB2ûm®_¾w‡ÉÓ–Äþ"oH’2‡w
ÀˆòùŽ]´æ+N®à;ë'à]…8«#Óâ’$Ê)Û6¡Z:Y3¨²- m—ì'f sÌ¢½º´f3Ë›™‹ÏNˆÁ(ø)DF«qGC>C ßÈ—í—·…'!äÿsÔÉâ?
EJbðò‡V‡Dx¯a]{SÂKUGQŠySù(ÌÒË3Þò”€$âøHüª¡6”Aã¶ÑJàŸyÑMÇõÚ†§Y³‚ý¶1½ªfÛ¹ÀVÕK~ZUÊêm}Êê—²ÛIU·»¾[M»ÀöþÛ¿ëÛêò¶j9ÍjÕ4놫š3϶ŠEÝTµ7Ža»†Îœzu=ïÕ|~Ò󓞨ÜÆóZq~A-[õSe_<UÓ¬ÕÂÇï³ÿª1iÜT›?@W]£dÝn=5g®ÁûZ7<¢·
¥ŒR‚©8‡y,6ÖÒ°Õ…^"tWƒÐé#§»ªTàt¯ÎVå™5å8ù˜¿ÂÇÑÜGÏZÌK¢÷ª©åÌʃɨêÝYÔ/u÷‚©à~®ï÷/§ž¥yË5`~~èK¹Bkére/-§Ü–òù®6-O[^³òYAOgoŠóòÃÓ0+ÔRDç›ìlciÙ®ç>.Ë1oî¥jÏ=Õ÷é>f|º'3†ó.YVtë`ŸFpêYqøVé”\<.©Žš>ÿ΂?mÊpÀ—³·tü„ÿ ÿÿ PK ! 6]p Í, xl/worksheets/sheet4.xmlœZMoã6½è0t_[Ô§eÄYìv»èZÝ~œYŽ…Ø–+)Éæß—‹¶8œYxzIløiÞpøø4y÷þÛa?{©»¾ië@ÍÃ`V«vÓ×Á_~~·fýP7å¾=Öëàîƒ÷÷?þp÷ÚvOý®®‡™Žpì×ÁnN«Å¢¯võ¡ìçí©>ê_¶mw(ýµ{\ô§®.7pÑa¿ˆÂ0[Êæœ#¬º[b´ÛmSÕŸÚêùP‡s®Þ—ƒÎ¿ß5§ÞF;T·„;”ÝÓóé]ÕN:ÄC³o†7ÌÕêËã±íʇ½÷7•”•
_¼ð‡¦êÚ¾ÝsnqNÔs±(:ÒýÔá÷n¦‹]ÿV4ÇWSÎ$XÜßm=:3%³®Þ®ƒjõq™à¢¿›úµŸ|ž™¹xhÛ'ó×Í:Møz_W¦*³Rÿ{©ª÷ûuð³2óù/D5ŸuÈÅ%æô³ÿæO§¹©·åó~ø£}ý¥nwƒKªëaʲڼ}ªûJχ¦žG©‰Zµ{Bÿ#,]Ïòüm6ÃÎ\=ÏUXĹŽÒo¦ÆJ‹¯zî‡öðψ#cDcýŒ'ó4c¥)/14ÓCÝŸ“áwãÅ6§,^&—˜Å\%a6‰X@‘ÎãR}*‡òþ®k_gZ±š¢?•Fÿj¥£ë¡a°X5N'×ëIz¹ï/ºîÕù8BtnH”\0Íz¡Öan§6`D¥ˆ{Ä8ÜÍ1·s0æÎ÷ˆq¸—4·ž«Û¹
sˆ{ÄL¹ãæ6B»yº
ï xl/printerSettings/printerSettings1.binPK- ! ¢Õ¼” —ñ docProps/app.xmlPK- ! ¬ Ä‚k aõ docProps/core.xmlPK- ! »SûŸ Ñ ø xl/calcChain.xmlPK Ðø
I really don't know how to do this. Guys please help me out.