esprco

Check Each Line of a CSV File and Output Specific Information according to Certain Requirements #53

Check Each Line of a CSV File and Output Specific Information according to Certain Requirements #53

Problem description & analysis Below is text file txt.txt, where the second column contains quantities and the third column contains unit prices: 111111,34,24.5,Apple 222222,53,22.0,Mango 333333,,32.0,Orange 44444,22,12.6, We are trying to handle this text file according to requirements below: If there is any null field in the current row, output the words “Error in line# N: insufficient/invalid data”; If the current row is empty, output the words “Line# N is empty”; Simple calculations; Append an empty row and a row of total sales, as shown below: Sold 34 Apple at £24.50 Line#2 is empty Sold 53 Mango at £22.00 Line#4 is…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.