kaivi
8 years agoContributor
Read table from windows application and write to file
Hey,
i wanna read a table from a windows application and write it to a .txt file. What i have for now is following:
function list_to_String(){
var row = Aliases.XXX.MainForm.radPanel1.MainPageView.tabCylinder.gvCylinder.wRowCount;
var column = Aliases.XXX.MainForm.radPanel1.MainPageView.tabCylinder.gvCylinder.wColumnCount;
Log.Message(row);
Log.Message(column);
for(var x = 0; x <= row-1; x++){
for(var y = 0; y <= column-1; y++){
cellContent = Aliases.CES_CyproAssist_TBInfo.MainForm.radPanel1.MainPageView.tabCylinder.gvCylinder.wValue(x,y);
Log.Message(cellContent);
aqFile.WriteToTextFile("C:\\Users\\XXX\\Desktop\\TestComplete.txt", cellContent, aqFile.ctANSI, false);
aqFile.WriteToTextFile("C:\\Users\\XXX\\Desktop\\TestComplete.txt", ";", aqFile.ctANSI, false);
}
}
}
So i have a file with the values from all cells in one .txt row.
Question:
Is there a better way to do it?
How can i add a [Enter] after each row?
aqFile.WriteToTextFile("C:\\Users\\XXX\\Desktop\\TestComplete.txt", '\r\n', aqFile.ctANSI, false);
best regards
Kai