Re: Reading from log file and writing into Excel file(C#.NET OR VB.NET
- From: "Bruce W. Darby" <kracorat@xxxxxxxxxxxxx>
- Date: Mon, 22 Jan 2007 08:54:51 -0700
So Aaron, why don't you just show him something in VBA that might help him
resolve his issue? Or can't you?
Bruce
<aaron.kempf@xxxxxxxxx> wrote in message
news:1169478791.242918.303280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
use VBA; I mean what's the point of using DOTNET to talk to Excel?
Excel macros work just flawlessly
-Aaron
deepak wrote:
Hi All,
i want to create a C# or VB.NET application(may be a console or
whatever) which will read the specific text from a notepad file(which is
a
log file basically) and write it to excel ***.
Detailed requirement is given below:->
My Log file has the following structure(data) inside this.Here you can
see
only 2 paragraphs(one which start from Date Time: 2007-01-22 00:01:31 and
other which start from Date Time: 2007-01-22 00:03:34),The log files can
contains any no. of paragraphs.
What i need is to pick up NOCRefIDs(present in the
<NOCRefID>...<NOCRefID/>
sections e.g 000000000125944 and 000000000125945 and Sites present in
the
<Site>...<Site/> sections e.g.BSC `HR_HRYBSC2` BTS TRWD08 and BSC
`KK_BSC17`
BTS BHURPT and put in the new excel file with 2 respective columns for
NOCRefID and Site respectively.
**************************************************************************************************************************************************************************************************
Date Time: 2007-01-22 00:01:31
Server Name: ESEALMW451
User Name: wfmsacc
Error Number: 55001
Error Description: The Specified Site does not exist
Error Source: W6PTaskUpdateOrAdd::InitTasksFromXML \\
W6PTaskUpdateOrAdd::InitTasksFromXML \\
W6PTaskUpdateOrAdd::ProcessMessage
Outgoing Message Key: -1
Incoming Message: <SXPTaskUpdateOrAdd Source="India_Bharti"
Revision="7.5.0"
xmlns:a="http://www.w3.org/2000/xforms"><Task><ClosedNumber>0</ClosedNumber><EquipmentType><Name>BTS</Name><Customer>BHARTI</Customer></EquipmentType><NOCRefID>000000000125944</NOCRefID><Customer>BHARTI</Customer><NewComment>BTS
EXTERNAL FAULT MO RSITE CLASS RXOCF-48 TRWD08 1 EXTERNAL ALARM LOW
BATTERY
VOLTAGE END-ProbableCause(OSS)=Different causes possible for same
message</NewComment><TaskType>Corrective</TaskType><Title>TRWD08 LOW
BATTERY</Title><Site>BSC `HR_HRYBSC2` BTS
TRWD08</Site><Priority>3</Priority><Status>Unassigned</Status><SubType>Power</SubType><NumberOfRequiredEngineers>1
</NumberOfRequiredEngineers><AutoCreate>1</AutoCreate></Task></SXPTaskUpdateOrAdd>
Date Time: 2007-01-22 00:03:34
Server Name: ESEALMW451
User Name: wfmsacc
Error Number: 55001
Error Description: The Specified Site does not exist
Error Source: W6PTaskUpdateOrAdd::InitTasksFromXML \\
W6PTaskUpdateOrAdd::InitTasksFromXML \\
W6PTaskUpdateOrAdd::ProcessMessage
Outgoing Message Key: -1
Incoming Message: <SXPTaskUpdateOrAdd Source="India_Bharti"
Revision="7.5.0"
xmlns:a="http://www.w3.org/2000/xforms"><Task><ClosedNumber>0</ClosedNumber><EquipmentType><Name>BTS</Name><Customer>BHARTI</Customer></EquipmentType><NOCRefID>000000000125945</NOCRefID><Customer>BHARTI</Customer><NewComment>BTS
EXTERNAL FAULTMO RSITE CLASSRXOCF-1 BHURPT 1EXTERNAL ALARMLOW BATTERY
VOLTAGE
SITE ON BATTERY
END</NewComment><TaskType>Corrective</TaskType><Title>RADIO
X-CEIVER ADMINISTRATION BTS EXTERNAL FAULT</Title><Site>BSC `KK_BSC17`
BTS
BHURPT</Site><Priority>3</Priority><Status>Unassigned</Status><SubType>Power</SubType><NumberOfRequiredEngineers>1
</NumberOfRequiredEngineers><AutoCreate>1</AutoCreate></Task></SXPTaskUpdateOrAdd>
***************************************************************************************************************************************************************************************************
What i think is , i should browes the log file from the inetrface of the
form and put that so that the path of notepad(log file0 can be picked up
from
there.
Thanks,
Deepak
kr_deepak123@xxxxxxxxxxx
kr_deepak123@xxxxxxxxxxx
kr_deepak123@xxxxxxxxx
.
- References:
- Reading from log file and writing into Excel file(C#.NET OR VB.NET
- From: deepak
- Re: Reading from log file and writing into Excel file(C#.NET OR VB.NET
- From: aaron.kempf@xxxxxxxxx
- Reading from log file and writing into Excel file(C#.NET OR VB.NET
- Prev by Date: Re: Help - Array = Nothing - How do I catch
- Next by Date: Re: Calling Shared Constructors/Finalizers
- Previous by thread: Re: Reading from log file and writing into Excel file(C#.NET OR VB.NET
- Next by thread: Re: File Dates
- Index(es):