-
change the specific line
hi by using VB how to read the specific line and change the line in the tex file.
i has 92 line and i only want to change the line 64
here the line
Rep.SetProperty "Dates","1/8/2006-1/10/2006"
i just want to capture the daily date into txt file
plz help me it is urgent
-
If the lines are of equal length you can open a file for Random with LEN=nnn, and then specifically reference any record.
However, if they are not the same length, you will need to open one file for input and one for output, use the LINE INPUT # and PRINT # methods to read & write 63 (in your case) lines, do what you like with line 64, then loop through reading 65+ and writing same.
-
 Originally Posted by gupex
If the lines are of equal length you can open a file for Random with LEN=nnn, and then specifically reference any record.
However, if they are not the same length, you will need to open one file for input and one for output, use the LINE INPUT # and PRINT # methods to read & write 63 (in your case) lines, do what you like with line 64, then loop through reading 65+ and writing same.
can i have the sample code to do this program.plz help me it is urgent.
still new to vb
-
As suggested in my earlier post, there are 2 different methods depending on the structure of the file you are trying to change. If you can idicate which type you are using (fixed length records, or variable length, then I can provide a little more info.
In either case, if you type each of the words 'Random' and 'Input' and press F1 for Help, you will receive more info. If you do this and still have a problem, then let us know what problem you are still having.
-
hi here the file content(all together 92 line)
'LANGUAGE=ENU
'SERVERNAME=172.30.253.18
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: Designer: GAR TAC MC Table Sept 2001: Export Data"
'## Parameters.Add "Report: Historical: Designer: GAR TAC MC Table Sept 2001: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Designer\GAR TAC MC Table Sept 2001","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "1110","_Top"
'## Parameters.Add "1140","_Left"
'## Parameters.Add "9585","_Width"
'## Parameters.Add "8955","_Height"
'## Parameters.Add "The report Historical\Designer\GAR TAC MC Table Sept 2001 was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "11;19","Main Splits/Skills"
'## Parameters.Add "11;19","Other Splits/Skills"
'## Parameters.Add "1/11/2006-1/14/2006","Dates"
'## Parameters.Add "1","Day Shift"
'## Parameters.Add "1","Night Shift"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "C:\Documents and Settings\wooi\Desktop\EOW-4.txt","_Output"
'## Parameters.Add "44","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "True","_NullToZero"
'## Parameters.Add "True","_Labels"
'## Parameters.Add "True","_DurSecs"
On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\GAR TAC MC Table Sept 2001")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Historical\Designer\GAR TAC MC Table Sept 2001 was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("AVSERR.cvsLog")
Log.AutoLogWrite "The report Historical\Designer\GAR TAC MC Table Sept 2001 was not found on ACD 1."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 1110
Rep.Window.Left = 1140
Rep.Window.Width = 9585
Rep.Window.Height = 8955
Rep.SetProperty "Main Splits/Skills","11;19"
Rep.SetProperty "Other Splits/Skills","11;19"
Rep.SetProperty "Dates","1/11/2006"
Rep.SetProperty "Day Shift","1"
Rep.SetProperty "Night Shift","1"
b = Rep.ExportData("C:\Documents and Settings\wooi\Desktop\EOW-4.txt", 44, 0, True, True, True)
Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
End If
Set Info = Nothing
'## cvs_cmd_end
End Sub
i just want read the line 64 and change the date
Rep.SetProperty "Dates","1/11/2006"
i no idea how to do this.plz guide me thanks.
-
There are a lot of 'commented' lines, but even so, I can't find any reference to 'cvsSrv' so ....I might/must be missing something.
Phil, Marco, Paul, etc .... over to you ...
Similar Threads
-
By Don in forum VB Classic
Replies: 1
Last Post: 09-01-2005, 11:58 AM
-
By Jonathan Allen in forum .NET
Replies: 1
Last Post: 03-11-2002, 09:03 PM
-
By Patrice Scribe in forum .NET
Replies: 0
Last Post: 08-07-2001, 09:26 AM
-
Replies: 0
Last Post: 08-07-2001, 08:53 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks