Skip to main content
Formatted code
Source Link
MarcoB
  • 67.7k
  • 18
  • 96
  • 198

You don't say what you mean by row and column. If you mean characters then this (with better error checking for invalid column number)

character[file_, row_Integer, column_Integer] := StringTake[Import[file, {"Text", "Lines", row}], {column, column}]

character[file_, row_Integer, column_Integer] := 
  StringTake[Import[file, {"Text", "Lines", row}], {column, column}]

If you mean something more structured like CSV contents then

csvItem[file_, row_Integer, column_Integer] := Import[file, {"Data", row, column}];

csvItem[file_, row_Integer, column_Integer] := 
  Import[file, {"Data", row, column}];

You don't say what you mean by row and column. If you mean characters then this (with better error checking for invalid column number)

character[file_, row_Integer, column_Integer] := StringTake[Import[file, {"Text", "Lines", row}], {column, column}]

If you mean something more structured like CSV contents then

csvItem[file_, row_Integer, column_Integer] := Import[file, {"Data", row, column}];

You don't say what you mean by row and column. If you mean characters then this (with better error checking for invalid column number)

character[file_, row_Integer, column_Integer] := 
  StringTake[Import[file, {"Text", "Lines", row}], {column, column}]

If you mean something more structured like CSV contents then:

csvItem[file_, row_Integer, column_Integer] := 
  Import[file, {"Data", row, column}];
Source Link

You don't say what you mean by row and column. If you mean characters then this (with better error checking for invalid column number)

character[file_, row_Integer, column_Integer] := StringTake[Import[file, {"Text", "Lines", row}], {column, column}]

If you mean something more structured like CSV contents then

csvItem[file_, row_Integer, column_Integer] := Import[file, {"Data", row, column}];