SpreadsheetFileProblem
Package: Libraries.Interface.Controls.Support · Inherits from: Libraries.Language.Object
The SpreadsheetFileProblem class says what wasn't valid in a comma separated value (CSV) file, and where: the row and column of the value, counted from 0. SpreadsheetFile makes one for each problem it finds while reading, such as a quoted value whose closing quote never comes. The file is still read; the value takes the rest of the file, and saving writes it as valid CSV.
Example Code
use Libraries.Interface.Controls.Support.SpreadsheetFile
use Libraries.Interface.Controls.Support.SpreadsheetFileProblem
use Libraries.Interface.Controls.Support.SpreadsheetRow
use Libraries.Containers.Array
SpreadsheetFile reader
text quote = ""
quote = quote:GetDoubleQuote()
Array<SpreadsheetRow> rows = reader:Read("Name,Note" + quote + "never closed")
Array<SpreadsheetFileProblem> problems = reader:GetProblems()
if not problems:IsEmpty()
output problems:Get(0):GetDescription()
end
Actions
GetColumn()
This action returns the column of the value with the problem, from 0.
Returns
integer: The column.
GetDescription()
This action returns what is wrong, in a sentence, such as "A quoted value never closes."
Returns
text: The description.
GetRow()
This action returns the row of the value with the problem, from 0.
Returns
integer: The row.
Set(integer row, integer column, text description)
This action sets where the problem is and what it is. SpreadsheetFile calls it.
Parameters
rowinteger: The row of the value, from 0.columninteger: The column of the value, from 0.descriptiontext: What is wrong, in a sentence.