We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey, excellent package you have here.
I was experimenting with it and using this example from the docs.
julia> using Dates julia> import DataFrames, XLSX julia> df = DataFrames.DataFrame(integers=[1, 2, 3, 4], strings=["Hey", "You", "Out", "There"], floats=[10.2, 20.3, 30.4, 40.5], dates=[Date(2018,2,20), Date(2018,2,21), Date(2018,2,22), Date(2018,2,23)], times=[Dates.Time(19,10), Dates.Time(19,20), Dates.Time(19,30), Dates.Time(19,40)], datetimes=[Dates.DateTime(2018,5,20,19,10), Dates.DateTime(2018,5,20,19,20), Dates.DateTime(2018,5,20,19,30), Dates.DateTime(2018,5,20,19,40)]) 4×6 DataFrames.DataFrame │ Row │ integers │ strings │ floats │ dates │ times │ datetimes │ │ │ Int64 │ String │ Float64 │ Date │ Time │ DateTime │ ├─────┼──────────┼─────────┼─────────┼────────────┼──────────┼─────────────────────┤ │ 1 │ 1 │ Hey │ 10.2 │ 2018-02-20 │ 19:10:00 │ 2018-05-20T19:10:00 │ │ 2 │ 2 │ You │ 20.3 │ 2018-02-21 │ 19:20:00 │ 2018-05-20T19:20:00 │ │ 3 │ 3 │ Out │ 30.4 │ 2018-02-22 │ 19:30:00 │ 2018-05-20T19:30:00 │ │ 4 │ 4 │ There │ 40.5 │ 2018-02-23 │ 19:40:00 │ 2018-05-20T19:40:00 │ julia> XLSX.writetable("output_table.xlsx", df, overwrite=true, sheetname="report", anchor_cell="B2") julia> f = XLSX.readxlsx("output_table.xlsx") XLSXFile("output_table.xlsx") containing 1 Worksheet sheetname size range ------------------------------------------------- report 6x7 A1:G6 julia> s = f["report"] 6×7 XLSX.Worksheet: ["report"](A1:G6) julia> df2 = XLSX.eachtablerow(s) |> DataFrames.DataFrame 4×6 DataFrames.DataFrame │ Row │ integers │ strings │ floats │ dates │ times │ datetimes │ │ │ Int64 │ String │ Float64 │ Date │ Time │ DateTime │ ├─────┼──────────┼─────────┼─────────┼────────────┼──────────┼─────────────────────┤ │ 1 │ 1 │ Hey │ 10.2 │ 2018-02-20 │ 19:10:00 │ 2018-05-20T19:10:00 │ │ 2 │ 2 │ You │ 20.3 │ 2018-02-21 │ 19:20:00 │ 2018-05-20T19:20:00 │ │ 3 │ 3 │ Out │ 30.4 │ 2018-02-22 │ 19:30:00 │ 2018-05-20T19:30:00 │ │ 4 │ 4 │ There │ 40.5 │ 2018-02-23 │ 19:40:00 │ 2018-05-20T19:40:00 │
but when I do it all the types are Any.. is there something I am doing wrong? Thx
using Dates, XLSX, DataFrames df = DataFrames.DataFrame(integers=[1, 2, 3, 4], strings=["Hey", "You", "Out", "There"], floats=[10.2, 20.3, 30.4, 40.5], dates=[Date(2018,2,20), Date(2018,2,21), Date(2018,2,22), Date(2018,2,23)], times=[Dates.Time(19,10), Dates.Time(19,20), Dates.Time(19,30), Dates.Time(19,40)], datetimes=[Dates.DateTime(2018,5,20,19,10), Dates.DateTime(2018,5,20,19,20), Dates.DateTime(2018,5,20,19,30), Dates.DateTime(2018,5,20,19,40)]) XLSX.writetable("output_table.xlsx", df, overwrite=true, sheetname="report", anchor_cell="B2") f = XLSX.readxlsx("output_table.xlsx") s = f["report"] XLSX.eachtablerow(s) |> DataFrames.DataFrame 4×6 DataFrame Row │ integers strings floats dates times datetimes │ Any Any Any Any Any Any ─────┼────────────────────────────────────────────────────────────────────── 1 │ 1 Hey 10.2 2018-02-20 19:10:00 2018-05-20T19:10:00 2 │ 2 You 20.3 2018-02-21 19:20:00 2018-05-20T19:20:00 3 │ 3 Out 30.4 2018-02-22 19:30:00 2018-05-20T19:30:00 4 │ 4 There 40.5 2018-02-23 19:40:00 2018-05-20T19:40:00
The text was updated successfully, but these errors were encountered:
Closing as a dup of #225.
Sorry, something went wrong.
No branches or pull requests
Hey, excellent package you have here.
I was experimenting with it and using this example from the docs.
but when I do it all the types are Any.. is there something I am doing wrong? Thx
The text was updated successfully, but these errors were encountered: