Show Bid Request
Moving given line in a txt file to new fixed line in same file.
Bid Request Id: 34888
|
|
|
Posted by: |
Norsk IT (1 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Nov 11, 2002 4:18:53 AM EDT
|
Bidding Closes: |
Nov 25, 2002 4:49:12 AM EDT
|
Viewed (by coders): |
174 times
|
Deadline: |
11/30/2002
TIME EXPIRED
|
|
|
|
Description:
Hi all I have a small project, that includes reading ASCII txt files with invoice information, the files contain all the information needed, but its NOT consequent on each side. The file is used after reading as an input to a access code who then generates the invoices thru a report generator. When I have inconsequent output from the txt files the generator will not print correct information on each page,(the pagebreak in the generator failes regards to fixed pagebreak)and the information printed is rubbish. I need a code to search for a given word or caracter and then put that line to a fixed line, and push all the txt below this line down including the search txt.
Deliverables: Here is the code that i am using.
Function Prep() As Integer
Dim lngInFile As Long Dim lngOutFile As Long Dim strIn As String Dim strOut As String Dim lngCounter As Long Dim intPos As Integer Dim strReplace As String Dim dooloop As Long Dim PageBreak As Boolean 'True/False variable to tell if its the Dim GoToLine As Integer Dim LineCount As Integer 'Counter for current line number lngInFile = FreeFile Open "D:\ERGO\FA\BIN\Sgfakt.asc" For Input As lngInFile lngOutFile = FreeFile Open "D:\ERGO\FA\BIN\sgfakt.txt" For Output As lngOutFile
While Not EOF(lngInFile)
Line Input #lngInFile, strIn intPos = InStr(strIn, " LISTE") While intPos > 0 lngCounter = lngCounter + 1 strReplace = (" LISTE2") & vbCrLf 'do something... strIn = Replace(strIn, " LISTE1", strReplace, , 1) intPos = InStr(strIn, " LISTE1") Wend intPos = InStr(strIn, "Totalt ") While intPos > 0 lngCounter = lngCounter + 1 strReplace = "Totalt: " 'do something... strIn = Replace(strIn, "Totalt ", strReplace, , 1) intPos = InStr(strIn, "Totalt ") strIn = vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _ vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _ vbCrLf & vbCrLf & vbCrLf & vbCrLf & strIn Wend intPos = InStr(strIn, "Side: 2") While intPos > 0 lngCounter = lngCounter + 1 strReplace = "Side : 2" 'do something... strIn = Replace(strIn, "Side: 2", strReplace, , 1) intPos = InStr(strIn, "Side: 2")
strIn = vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _ vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & vbCrLf & _ vbCrLf & vbCrLf & vbCrLf & vbCrLf & strIn Wend intPos = InStr(strIn, " ----------------") While intPos > 0 lngCounter = lngCounter + 1 strReplace = " " 'do something... strIn = Replace(strIn, " ----------------", strReplace, , 1) intPos = InStr(strIn, " ----------------") Wend intPos = InStr(strIn, " 8398 10 03791") While intPos > 0 lngCounter = lngCounter + 1 strReplace = (" 8398 10 03791") & vbCrLf & (Chr(12)) 'do something... strIn = Replace(strIn, " 8398 10 03791", strReplace, , 1) intPos = InStr(strIn, " 8398 10 03791") Wend intPos = InStr(strIn, "") While intPos > 0 lngCounter = lngCounter + 1 strReplace = "Å" 'do something... strIn = Replace(strIn, "", strReplace, , 1) intPos = InStr(strIn, "") Wend intPos = InStr(strIn, "") While intPos > 0 lngCounter = lngCounter + 1 strReplace = "Ø" 'do something... strIn = Replace(strIn, "", strReplace, , 1) intPos = InStr(strIn, "") Wend
intPos = InStr(strIn, "›") While intPos > 0 lngCounter = lngCounter + 1 strReplace = "ø" 'do something... strIn = Replace(strIn, "›", strReplace, , 1) intPos = InStr(strIn, "›") Wend intPos = InStr(strIn, "†") While intPos > 0 lngCounter = lngCounte
Platform:
Windows 2000, Access2000, VB6
Must be 100% finished and received by buyer on:
Nov 30, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$25 (USD)
|
Nov 11, 2002 8:33:07 AM EDT
|
10
(Excellent)
|
|
|
Hi,
I'm sure I can sort this out for you very quickly. Can you send me an example of the file you work from and then the file you want from it, please attach anything you think would be relevant,
Best of luck either way,
Regards Ross
|
|
|
|
|
|