![]() |
CSV Header Information
I have an excel program that converts excel files to csv files automatically
using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
write the file yourself.
here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
This is coming up as Page not found.
"Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
Try it again. It works ok for me.
Help? wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? -- Dave Peterson |
CSV Header Information
I just copied this from the navigation window while viewing the cited page:
http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
Thanks, sorry. Can't seem to get to the below website and what I have is not
working. "Dave Peterson" wrote: Try it again. It works ok for me. Help? wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? -- Dave Peterson |
CSV Header Information
http://support.microsoft.com/default...b;en-us;151262 Working with Sequential Access Files http://www.applecore99.com/gen/gen029.asp http://support.microsoft.com/support...eio/fileio.asp http://web.archive.org/web/200404050...eio/fileio.asp File Access with Visual BasicĀ® for Applications -- Regards, Tom Ogilvy "Help?" wrote: Thanks, sorry. Can't seem to get to the below website and what I have is not working. "Dave Peterson" wrote: Try it again. It works ok for me. Help? wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? -- Dave Peterson |
CSV Header Information
Finally got it! However, my programming is not accomplishing what I need. It
is outputing: %!,XGF,9999 SETBUFSIZE,"(,) SETDBSEP",QSTRIP_on,(GuntherIPEP.jdt) SETJDT,(IPEP.dbm) STARTDBM,EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERI C_KIT_COUNT,START_DATE,END_DATE,PIN_CODE,CEO_LETTE R_OPTION,CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETT ER_DATE,HOW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETT ER_FROM,HOW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMEN T_OPTION,GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS _WILL_BE,WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TE LEPHONE_NUMBER,SELF_SERVE_START_DATE,SELF_SERVE_EN D_DATE,ACCIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD, TERM_LIFE,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP _TERM_LIFE,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4 ,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 I need: %! XGF,9999 SETBUFSIZE (,) SETDBSEP",QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERIC_KIT_COU NT,START_DATE,END_DATE,PIN_CODE,CEO_LETTER_OPTION, CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETTER_DATE,H OW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETTER_FROM,H OW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMENT_OPTION, GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS_WILL_BE, WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TELEPHONE_N UMBER,SELF_SERVE_START_DATE,SELF_SERVE_END_DATE,AC CIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD,TERM_LIFE ,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP_TERM_LIF E,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 My programming is: Dim RowNdx As Integer Dim ColNdx As Integer Dim WholeLine As String Dim FName As String Application.ScreenUpdating = False ColNdx = Range("A1").Column RowNdx = Range("A1").Row FName = "I:\06vs-EC Standard Kit Request Form\5 Daniel Huffine\Final Fully Automated\Test new directions\CSV Header testing\FName.txt" Open FName For Input Access Read As #1 While Not EOF(1) Line Input #1, WholeLine Cells(RowNdx, ColNdx).Value = WholeLine ColNdx = ColNdx + 1 Wend Close #1 Is their something I am doing wrong? "Tom Ogilvy" wrote: I just copied this from the navigation window while viewing the cited page: http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
I thought you said you want to write/create a csv file with your data in it,
adding hour header at the top. Your code is reading a file and putting it into Excel? The lower part of the cited page has code to write a file. -- Regards, Tom Ogilvy "Help?" wrote: Finally got it! However, my programming is not accomplishing what I need. It is outputing: %!,XGF,9999 SETBUFSIZE,"(,) SETDBSEP",QSTRIP_on,(GuntherIPEP.jdt) SETJDT,(IPEP.dbm) STARTDBM,EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERI C_KIT_COUNT,START_DATE,END_DATE,PIN_CODE,CEO_LETTE R_OPTION,CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETT ER_DATE,HOW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETT ER_FROM,HOW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMEN T_OPTION,GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS _WILL_BE,WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TE LEPHONE_NUMBER,SELF_SERVE_START_DATE,SELF_SERVE_EN D_DATE,ACCIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD, TERM_LIFE,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP _TERM_LIFE,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4 ,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 I need: %! XGF,9999 SETBUFSIZE (,) SETDBSEP",QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERIC_KIT_COU NT,START_DATE,END_DATE,PIN_CODE,CEO_LETTER_OPTION, CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETTER_DATE,H OW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETTER_FROM,H OW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMENT_OPTION, GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS_WILL_BE, WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TELEPHONE_N UMBER,SELF_SERVE_START_DATE,SELF_SERVE_END_DATE,AC CIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD,TERM_LIFE ,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP_TERM_LIF E,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 My programming is: Dim RowNdx As Integer Dim ColNdx As Integer Dim WholeLine As String Dim FName As String Application.ScreenUpdating = False ColNdx = Range("A1").Column RowNdx = Range("A1").Row FName = "I:\06vs-EC Standard Kit Request Form\5 Daniel Huffine\Final Fully Automated\Test new directions\CSV Header testing\FName.txt" Open FName For Input Access Read As #1 While Not EOF(1) Line Input #1, WholeLine Cells(RowNdx, ColNdx).Value = WholeLine ColNdx = ColNdx + 1 Wend Close #1 Is their something I am doing wrong? "Tom Ogilvy" wrote: I just copied this from the navigation window while viewing the cited page: http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
I apologize, I am not an excel VBA Programmer. I am trying to coordinate this
to help some of our business partners and the websit you pointed me to says that this was the code to add the header information. Is there any help? "Tom Ogilvy" wrote: I thought you said you want to write/create a csv file with your data in it, adding hour header at the top. Your code is reading a file and putting it into Excel? The lower part of the cited page has code to write a file. -- Regards, Tom Ogilvy "Help?" wrote: Finally got it! However, my programming is not accomplishing what I need. It is outputing: %!,XGF,9999 SETBUFSIZE,"(,) SETDBSEP",QSTRIP_on,(GuntherIPEP.jdt) SETJDT,(IPEP.dbm) STARTDBM,EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERI C_KIT_COUNT,START_DATE,END_DATE,PIN_CODE,CEO_LETTE R_OPTION,CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETT ER_DATE,HOW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETT ER_FROM,HOW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMEN T_OPTION,GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS _WILL_BE,WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TE LEPHONE_NUMBER,SELF_SERVE_START_DATE,SELF_SERVE_EN D_DATE,ACCIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD, TERM_LIFE,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP _TERM_LIFE,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4 ,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 I need: %! XGF,9999 SETBUFSIZE (,) SETDBSEP",QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERIC_KIT_COU NT,START_DATE,END_DATE,PIN_CODE,CEO_LETTER_OPTION, CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETTER_DATE,H OW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETTER_FROM,H OW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMENT_OPTION, GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS_WILL_BE, WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TELEPHONE_N UMBER,SELF_SERVE_START_DATE,SELF_SERVE_END_DATE,AC CIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD,TERM_LIFE ,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP_TERM_LIF E,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 My programming is: Dim RowNdx As Integer Dim ColNdx As Integer Dim WholeLine As String Dim FName As String Application.ScreenUpdating = False ColNdx = Range("A1").Column RowNdx = Range("A1").Row FName = "I:\06vs-EC Standard Kit Request Form\5 Daniel Huffine\Final Fully Automated\Test new directions\CSV Header testing\FName.txt" Open FName For Input Access Read As #1 While Not EOF(1) Line Input #1, WholeLine Cells(RowNdx, ColNdx).Value = WholeLine ColNdx = ColNdx + 1 Wend Close #1 Is their something I am doing wrong? "Tom Ogilvy" wrote: I just copied this from the navigation window while viewing the cited page: http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
Insert the necessary rows at the top
Put your header information at the top of your worksheet in a single column (column A), multiple rows. Then do your save as CSV. -- Regards, Tom Ogilvy "Help?" wrote in message ... I apologize, I am not an excel VBA Programmer. I am trying to coordinate this to help some of our business partners and the websit you pointed me to says that this was the code to add the header information. Is there any help? "Tom Ogilvy" wrote: I thought you said you want to write/create a csv file with your data in it, adding hour header at the top. Your code is reading a file and putting it into Excel? The lower part of the cited page has code to write a file. -- Regards, Tom Ogilvy "Help?" wrote: Finally got it! However, my programming is not accomplishing what I need. It is outputing: %!,XGF,9999 SETBUFSIZE,"(,) SETDBSEP",QSTRIP_on,(GuntherIPEP.jdt) SETJDT,(IPEP.dbm) STARTDBM,EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERI C_KIT_COUNT,START_DATE,END_DATE,PIN_CODE,CEO_LETTE R_OPTION,CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETT ER_DATE,HOW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETT ER_FROM,HOW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMEN T_OPTION,GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS _WILL_BE,WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TE LEPHONE_NUMBER,SELF_SERVE_START_DATE,SELF_SERVE_EN D_DATE,ACCIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD, TERM_LIFE,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP _TERM_LIFE,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4 ,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 I need: %! XGF,9999 SETBUFSIZE (,) SETDBSEP",QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERIC_KIT_COU NT,START_DATE,END_DATE,PIN_CODE,CEO_LETTER_OPTION, CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETTER_DATE,H OW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETTER_FROM,H OW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMENT_OPTION, GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS_WILL_BE, WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TELEPHONE_N UMBER,SELF_SERVE_START_DATE,SELF_SERVE_END_DATE,AC CIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD,TERM_LIFE ,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP_TERM_LIF E,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 My programming is: Dim RowNdx As Integer Dim ColNdx As Integer Dim WholeLine As String Dim FName As String Application.ScreenUpdating = False ColNdx = Range("A1").Column RowNdx = Range("A1").Row FName = "I:\06vs-EC Standard Kit Request Form\5 Daniel Huffine\Final Fully Automated\Test new directions\CSV Header testing\FName.txt" Open FName For Input Access Read As #1 While Not EOF(1) Line Input #1, WholeLine Cells(RowNdx, ColNdx).Value = WholeLine ColNdx = ColNdx + 1 Wend Close #1 Is their something I am doing wrong? "Tom Ogilvy" wrote: I just copied this from the navigation window while viewing the cited page: http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
CSV Header Information
I have tried this. The header information needs to only be recognized by the
printing program and not as a record in the xlcsv. That's why I was pulling in as text. Once the csv conversion had taken place, pulling in the header information as text allowed it to not be recognized as records. However, it would show in the wrong order. See the example below. It is either pulling in the information side by side or it will pull in the first column. It wouldn't work that way. Any ideas? "Tom Ogilvy" wrote: Insert the necessary rows at the top Put your header information at the top of your worksheet in a single column (column A), multiple rows. Then do your save as CSV. -- Regards, Tom Ogilvy "Help?" wrote in message ... I apologize, I am not an excel VBA Programmer. I am trying to coordinate this to help some of our business partners and the websit you pointed me to says that this was the code to add the header information. Is there any help? "Tom Ogilvy" wrote: I thought you said you want to write/create a csv file with your data in it, adding hour header at the top. Your code is reading a file and putting it into Excel? The lower part of the cited page has code to write a file. -- Regards, Tom Ogilvy "Help?" wrote: Finally got it! However, my programming is not accomplishing what I need. It is outputing: %!,XGF,9999 SETBUFSIZE,"(,) SETDBSEP",QSTRIP_on,(GuntherIPEP.jdt) SETJDT,(IPEP.dbm) STARTDBM,EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERI C_KIT_COUNT,START_DATE,END_DATE,PIN_CODE,CEO_LETTE R_OPTION,CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETT ER_DATE,HOW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETT ER_FROM,HOW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMEN T_OPTION,GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS _WILL_BE,WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TE LEPHONE_NUMBER,SELF_SERVE_START_DATE,SELF_SERVE_EN D_DATE,ACCIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD, TERM_LIFE,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP _TERM_LIFE,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4 ,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 I need: %! XGF,9999 SETBUFSIZE (,) SETDBSEP",QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM EMPLOYER,EE_STATE,EE_ZIP,APP_STATE,GENERIC_KIT_COU NT,START_DATE,END_DATE,PIN_CODE,CEO_LETTER_OPTION, CEO_LETTER_FROM,CEO_LETTER_TITLE,CEO_LETTER_DATE,H OW_LETTER_OPTION,HOW_LETTER_DATE,HOW_LETTER_FROM,H OW_LETTER_TITLE,HOW_LETTER_DEPT,ENROLLMENT_OPTION, GROUP_MEETINGS_WILL_BE,BENEFIT_COUNSELORS_WILL_BE, WILL_BE_DISTRIBUTED,CALL_CENTER_ENROLL_TELEPHONE_N UMBER,SELF_SERVE_START_DATE,SELF_SERVE_END_DATE,AC CIDENT,CANCER,CI,ISWL,LTC,MEDSUPPORT,STD,TERM_LIFE ,VIUL,GROUP_LTC,GROUP_LTD,GROUP_STD,GROUP_TERM_LIF E,WEB_ADDRESS,OTHER1,OTHER2,OTHER3,OTHER4,OTHER5 HEADER TESTING,,,,,,,,,,,,,,,,,,,Y,,,,,A,,,,,,,,,,,,,,,,, ,,,,,,,HEADER TESTING,39024.68396 My programming is: Dim RowNdx As Integer Dim ColNdx As Integer Dim WholeLine As String Dim FName As String Application.ScreenUpdating = False ColNdx = Range("A1").Column RowNdx = Range("A1").Row FName = "I:\06vs-EC Standard Kit Request Form\5 Daniel Huffine\Final Fully Automated\Test new directions\CSV Header testing\FName.txt" Open FName For Input Access Read As #1 While Not EOF(1) Line Input #1, WholeLine Cells(RowNdx, ColNdx).Value = WholeLine ColNdx = ColNdx + 1 Wend Close #1 Is their something I am doing wrong? "Tom Ogilvy" wrote: I just copied this from the navigation window while viewing the cited page: http://www.cpearson.com/excel/imptext.htm -- Regards, Tom Ogilvy "Help?" wrote: This is coming up as Page not found. "Tom Ogilvy" wrote: write the file yourself. here is some starter code: http://www.cpearson.com/excel/imptext.htm import/export text files -- Regards, Tom Ogilvy "Help?" wrote: I have an excel program that converts excel files to csv files automatically using VBA Macros. However, I am wanting to add csv print header information example: %! XGF 9999 SETBUFSIZE (,) SETDBSEP QSTRIP_on (GuntherIPEP.jdt) SETJDT (IPEP.dbm) STARTDBM The issue is that it must insert after csv conversion and not register as an excel record. Is there VBA macros that will accomplish this for me? If so, what would it be? |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com