calamine icon indicating copy to clipboard operation
calamine copied to clipboard

RangeDeserializerBuilder example does not works

Open latot opened this issue 1 month ago • 3 comments

Hi, I'm following the example to read a columns from a xlsx:

  let mut excel: Xlsx<_> = open_workbook(path)?;

  let sheet_names = excel.sheet_names();

  if sheet_names.len() != 1 {
    todo!()
  }

  let range = excel.worksheet_range(sheet_names[0].as_str())?;
  let iter_records =
    RangeDeserializerBuilder::with_headers(&["column"])
    .from_range(&range)?;

But it fails with:

error[E0283]: type annotations needed for `RangeDeserializer<'_, Data, D>

Please fix the examples :3

Thx!

latot avatar May 15 '24 21:05 latot