I want to import a set of questions from a CSV file, and I need to specify the correct answer with 1 and all the others with 0 (see the attachment). For example 010 stands for ‘the 2° answer is correct’.
But when I try to read 010 from the CSV with the following command:
Workbook wb = new Workbook(pathCase, new TxtLoadOptions() { Separator = ‘;’ });
cell = wb.Worksheets[0].Cells[1, 4];
Console.WriteLine(cell.Value + “:” + cell.StringValue); //the output is 10:010
Of course, if user has no requirement of parsing numeric values automatically when reading the csv file, using “LoadOptions.ConvertNumericData=false” is better for performance consideration.