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

getTables - character & changing on sheet name #508

Open
allanbides opened this issue Apr 14, 2020 · 3 comments
Open

getTables - character & changing on sheet name #508

allanbides opened this issue Apr 14, 2020 · 3 comments

Comments

@allanbides
Copy link

Hello, guys,

I am using the function getTables, to discover the tables on Sheet "T&O", but I receive the message that this sheet does not exist, because the function in some way looks for the sheet 'T& amp;O' , changing the '&' by ' & amp;'(even here it was hard to write, I needed to put a space)

 getTables(wb,"T&O")
 Error: Sheet 'T&O' does not exist.

Any suggestions?

Thanks in advance!

Allan

sessionInfo()

  • Version of openxlsx: 4.1.4
  • Version of R: 3.4.3
@jsavinc
Copy link

jsavinc commented Jun 9, 2020

I'm experiencing the same issue with openxslsx version 4.1.5 and R 4.0.0!
I get the error with & and < characters, when with a previous version they worked fine (just updated today so not sure what version I was using previously).

@jsavinc
Copy link

jsavinc commented Jun 9, 2020

See below example:

wb <- openxlsx::createWorkbook()
openxlsx::addWorksheet(wb, sheet = "a < 1")  # this works
openxlsx::writeData(wb, sheet = "a < 1", jams)  # this returns an error

I can add a worksheet containing a special character, but when using writeData(), the sheet name first gets validated using validateSheet() which renames special characters using replaceIllegalCharacters(), but then checks against the existing sheet names (containing said character) and doesn't find the matching sheet. I don't know why the characters get replaced in one method but not the other?

@ycphs
Copy link
Contributor

ycphs commented Jul 17, 2020

Hi,

That is the old repository for this R Package.

Please use the new one:

https://github.com/ycphs/openxlsx

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

3 participants