Skip to content
New issue

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

Error in is.nan(tmp) : default method not implemented for type 'list' #528

Open
KptnKermit opened this issue Mar 27, 2021 · 2 comments
Open

Comments

@KptnKermit
Copy link

Expected Behavior

Write Data into a Table

Actual Behavior

writeData and WriteDateTable stops with error
Error in is.nan(tmp) : default method not implemented for type 'list'

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

Code:

Export File

dir.create("001_Export")
setwd("./001_Export")

excel_overview_file <- createWorkbook()
excel_overview_income <- addWorksheet(wb = excel_overview_file, sheetName = "Income")
excel_overview_orig <- addWorksheet(wb = excel_overview_file, sheetName = "Cumulated costs")
excel_overview_fixed <- addWorksheet(wb = excel_overview_file, sheetName = "Fixed costs")
excel_overview_variable <- addWorksheet(wb = excel_overview_file, sheetName ="Variable costs")
excel_overview_fixcats_monthly <- addWorksheet(wb = excel_overview_file, sheetName = "Fixcats_Monthly")
excel_overview_varcats_monthly <- addWorksheet(wb = excel_overview_file, sheetName = "Varcats_Monthly")
excel_overview_fixcats_yearly <- addWorksheet(wb = excel_overview_file, sheetName = "Fixcats_Yearly")
excel_overview_varcats_yearly <- addWorksheet(wb = excel_overview_file, sheetName = "Varcats_Yearly")
excel_overview_finanz <- addWorksheet(wb = excel_overview_file, sheetName = "Steuerausgleich")
#excel_origin <- addWorksheet(wb = excel_file, sheetName = "Original data")
excel_overview_title <- ("001a_Finanzdaten_kumuliert.xlsx")

writeDataTable(wb = excel_overview_file, x = income, sheet = excel_overview_income, withFilter = TRUE, keepNA = FALSE, na.string = NULL)

writeData(wb = excel_overview_file, x = costs, sheet = excel_overview_orig)

writeData(wb = excel_overview_file, x = fixcosts, sheet = excel_overview_fixed)

writeData(wb = excel_overview_file, x = variablecosts, sheet = excel_overview_variable)

writeData(wb = excel_overview_file, x = fixcats_month, sheet = excel_overview_fixcats_monthly)

writeData(wb = excel_overview_file, x = varcats_month, sheet = excel_overview_varcats_monthly)

writeData(wb = excel_overview_file, x = fixcats_year, sheet = excel_overview_fixcats_yearly)

writeData(wb = excel_overview_file, x = varcats_month, sheet = excel_overview_varcats_yearly)

writeData(wb = excel_overview_file, x = finanz, sheet = excel_overview_finanz)

#writeData(wb = excel_overview_file, x = yearly_data2, sheet = excel_overview_yearly)
#writeData(wb = excel_overview_file, x = submat, sheet = excel_origin)
saveWorkbook(overwrite = TRUE, excel_overview_file, excel_overview_title)

Used Data.Frame: Attached as test.xlsx
test.xlsx

sessionInfo()

  • Version of openxlsx: 4.2.3
  • Version of R: 4.0.4
@ycphs
Copy link
Contributor

ycphs commented Mar 27, 2021

Could you please create this also at ycphs/openxlsx?

I am maintaining the active fork of the package.

@KptnKermit
Copy link
Author

KptnKermit commented Mar 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants