Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Probelm with Data formatting

Anyone who can help me on this issue .
I am posting this issue again

Regards
Amit

Hi ,
I tried what you suggested but it did not work
here the same code i used to laod a text file and sample data file i try
to load
string m_sTempCSVFilePath =
"D:\\abc_051b66ed-532c-4bab-a068-b63eb2c239d8.txt" ;

axSpreadsheet1.ActiveSheet.Cells.get_Item(1,1).
LoadText(m_sTempCSVFilePath,";",false,"' '");

axSpreadsheet1.Show ();

content of abc_051b66ed-532c-4bab-a068-b63eb2c239d8.txt file

CORE DESC;CORE
3" GRNSTRIPE NOTCHED;3GN
3" HVYWALL INSERTED;3HI
3" HVYWALL NO NOTCH;3HP
3" HVYWALL NOTCHED;3HN
3" MEDWALL NO NOTCH;3MP
3" REGWALL INSERTED;3RI
3" REGWALL NO NOTCH;3RP
3" REGWALL NOTCHED;3RN
3" THINWALL NO NOTCH;3TP
3" THINWALL NOTCHED;3TN
3"GRNSTRIPE NO NOTCH;3GP
4" MEDWALL NO NOTCH;4MP
4" REGWALL INSERTED;4RI
4" REGWALL NO NOTCH;4RP
4" REGWALL NOTCHED;4RN
5" MEDWALL NO NOTCH;5MP
5" MEDWALL NOTCHED;5MN
5" REGWALL INSERTED;5RI
5" REGWALL NO NOTCH;5RP
5" REGWALL NOTCHED;5RN
6" HVYWALL NO NOTCH;6HP
6" HVYWALL NOTCHED;6HN
6" REGWALL INSERTED;6RI
6" REGWALL NO NOTCH;6RP
6" REGWALL NOTCHED;6RN
723456789012345A;77W
8" REGWALL NO NOTCH;8RP
8" REGWALL NOTCHED;8RN
FHFHA;76P
NO CORE NEEDED;...
RWQRA;77B
STANDARD LINER CORE;STD


"BrianB" wrote in message
om...
Change the .csv file to .txt - you get more control over input.

Regards
BrianB
================================================



"amit" wrote in message

...
HI ,

I am using following function call to laod a csv file .

axSpreadsheet1.ActiveSheet.Cells.get_Item(1,1).
LoadText(m_sTempCSVFilePath,";",false,"");

axSpreadsheet1.Show();

The probelm I am getting is if data is something like 123456A or 73453P

then
it is taking it as time and showing me junk time like 8/8/1889 11:00AM

..

data like 123456B or 34567B is working fine . Also data like A234567A ,
123A456A is working fine .

If I open CSV file directly in excel it is working fine . Also import

is
working fine

Thanks in Advance

Regards

Amit




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Probelm with Data formatting

Don't really understand your problem. Your code looks wrong. If you
set to record a macro as you open the file you get something like :-
Workbooks.OpenText FileName:= _ ............ etc.

Regards
BrianB
==============================================



"amit" wrote in message
...
Anyone who can help me on this issue .
I am posting this issue again

Regards
Amit

Hi ,
I tried what you suggested but it did not work
here the same code i used to laod a text file and sample data file i try
to load
string m_sTempCSVFilePath =
"D:\\abc_051b66ed-532c-4bab-a068-b63eb2c239d8.txt" ;

axSpreadsheet1.ActiveSheet.Cells.get_Item(1,1).
LoadText(m_sTempCSVFilePath,";",false,"' '");

axSpreadsheet1.Show ();

content of abc_051b66ed-532c-4bab-a068-b63eb2c239d8.txt file

CORE DESC;CORE
3" GRNSTRIPE NOTCHED;3GN
3" HVYWALL INSERTED;3HI
3" HVYWALL NO NOTCH;3HP
3" HVYWALL NOTCHED;3HN
3" MEDWALL NO NOTCH;3MP
3" REGWALL INSERTED;3RI
3" REGWALL NO NOTCH;3RP
3" REGWALL NOTCHED;3RN
3" THINWALL NO NOTCH;3TP
3" THINWALL NOTCHED;3TN
3"GRNSTRIPE NO NOTCH;3GP
4" MEDWALL NO NOTCH;4MP
4" REGWALL INSERTED;4RI
4" REGWALL NO NOTCH;4RP
4" REGWALL NOTCHED;4RN
5" MEDWALL NO NOTCH;5MP
5" MEDWALL NOTCHED;5MN
5" REGWALL INSERTED;5RI
5" REGWALL NO NOTCH;5RP
5" REGWALL NOTCHED;5RN
6" HVYWALL NO NOTCH;6HP
6" HVYWALL NOTCHED;6HN
6" REGWALL INSERTED;6RI
6" REGWALL NO NOTCH;6RP
6" REGWALL NOTCHED;6RN
723456789012345A;77W
8" REGWALL NO NOTCH;8RP
8" REGWALL NOTCHED;8RN
FHFHA;76P
NO CORE NEEDED;...
RWQRA;77B
STANDARD LINER CORE;STD


"BrianB" wrote in message
om...
Change the .csv file to .txt - you get more control over input.

Regards
BrianB
================================================



"amit" wrote in message

...
HI ,

I am using following function call to laod a csv file .

axSpreadsheet1.ActiveSheet.Cells.get_Item(1,1).
LoadText(m_sTempCSVFilePath,";",false,"");

axSpreadsheet1.Show();

The probelm I am getting is if data is something like 123456A or 73453P

then
it is taking it as time and showing me junk time like 8/8/1889 11:00AM

.

data like 123456B or 34567B is working fine . Also data like A234567A ,
123A456A is working fine .

If I open CSV file directly in excel it is working fine . Also import

is
working fine

Thanks in Advance

Regards

Amit

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Probelm opening Excel speadsheets John[_16_] Excel Discussion (Misc queries) 1 April 8th 08 10:06 PM
Probelm with macro mac Excel Worksheet Functions 5 January 14th 08 07:47 PM
AV probelm with Office 2007 John Excel Discussion (Misc queries) 2 October 6th 06 09:37 PM
Hyperlink probelm Glenn Richardson Excel Worksheet Functions 2 August 30th 05 02:26 PM
Hyperlink probelm Glenn Richardson Excel Discussion (Misc queries) 1 August 30th 05 01:44 PM


All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"