You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since merged cells are not parsed properly my column headers are not in line with my data. I devised a work-around but I need to read a specific range of values in my .ods file. Howerver, since merged cells values are pushed to the left end column, when I specify a range I get an error that column is undefined. Below a reprex. I am expecting to get expected_df as the result of read_ods and not an error.
Thanks for your help.
Jonathan
library(tibble)
#> Warning: le package 'tibble' a été compilé avec la version R 4.2.3
library(readODS)
df<- tibble(col1= c(1,2),
col2= c(3,4))
df#> # A tibble: 2 × 2#> col1 col2#> <dbl> <dbl>#> 1 1 3#> 2 2 4
write_ods(x=df, path="x.ods")
read_ods(path="x.ods", range="A1:C2")
#> Error in `[.data.frame`(raw_sheet, range_select$ul[1]:range_select$lr[1], : colonnes non définies sélectionnéesexpected_df<- tibble(col1= c(1,2),
col2= c(3,4),
C= c(NA_character_,NA_character_))
expected_df#> # A tibble: 2 × 3#> col1 col2 C #> <dbl> <dbl> <chr>#> 1 1 3 <NA> #> 2 2 4 <NA>
@jherculecitepa As it is the behaviour of readxl, we should keep this in our agenda. But sorry that we have no ETA. If you can, you might also take a look on how to implement this.
Hello,
Since merged cells are not parsed properly my column headers are not in line with my data. I devised a work-around but I need to read a specific range of values in my .ods file. Howerver, since merged cells values are pushed to the left end column, when I specify a range I get an error that column is undefined. Below a reprex. I am expecting to get
expected_df
as the result ofread_ods
and not an error.Thanks for your help.
Jonathan
Created on 2023-06-15 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: