extractSheetName: Extracting the sheet name from a formula

Description Usage Arguments Value Author(s) Examples

View source: R/extractSheetName.R

Description

Extracts the sheet name from a formula of the form <SHEET_NAME>!<CELL_ADDRESS>

Usage

1

Arguments

formula

Formula string of the form <SHEET_NAME>!<CELL_ADDRESS>. Note that the validity of the formula won't be checked.

Value

Returns the name of the sheet referenced in the formula. For quoted sheet names (required if names contain e.g. whitespaces or exclamation marks (!)) in formulas the function returns the unquoted name.

Author(s)

Martin Studer
Mirai Solutions GmbH http://www.mirai-solutions.com

Examples

1
extractSheetName(c("MySheet!$A$1", "'My Sheet'!$A$1", "'My!Sheet'!$A$1"))

Example output

Loading required package: XLConnectJars
OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
XLConnect 0.2-12 by Mirai Solutions GmbH [aut],
  Martin Studer [cre],
  The Apache Software Foundation [ctb, cph] (Apache POI, Apache Commons
    Codec),
  Stephen Colebourne [ctb, cph] (Joda-Time Java library),
  Graph Builder [ctb, cph] (Curvesapi Java library)
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
[1] "MySheet"  "My Sheet" "My!Sheet"
Warning message:
system call failed: Cannot allocate memory 

XLConnect documentation built on April 6, 2018, 1:03 a.m.