openxlsx
31
Usage
openXL(file=NULL)
Arguments
file
path to the Excel (xls/xlsx) file or Workbook object.
Author(s)
Luca Braglia
Examples
# file example
example(writeData)
#openXL("writeDataExample.xlsx")
# (not yet saved) Workbook example
wb <- createWorkbook()
x <- mtcars[1:6,]
addWorksheet(wb, "Cars")
writeData(wb, "Cars", x, startCol = 2, startRow = 3, rowNames = TRUE)
#openXL(wb)
openxlsx
xlsx reading,writing and editing.
Description
openxlsx simplifies the the process of writing and styling Excel xlsx files from R and removes the
dependency on Java.
Details
The openxlsx package uses global options to simplfy formatting:
• options("openxlsx.borderColour" = "black")
• options("openxlsx.borderStyle" = "thin")
• options("openxlsx.dateFormat" = "mm/dd/yyyy")
• options("openxlsx.datetimeFormat" = "yyyy-mm-dd hh:mm:ss")
• options("openxlsx.numFmt" = NULL)
See the Formatting vignette for examples.
Pdf find and replace text - search text inside PDF file in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Learn how to search text in PDF document and obtain text content and location information
pdf text select tool; pdf find and replace text
Pdf find and replace text - VB.NET PDF Text Search Library: search text inside PDF file in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Learn How to Search Text in PDF Document and Obtain Text Content and Location Information in VB.NET application
pdf make text searchable; can't select text in pdf file
32
pageSetup
See Also
• vignette("Introduction", package = "openxlsx")
• vignette("formatting", package = "openxlsx")
• writeData
• writeDataTable
• write.xlsx
• read.xlsx
for examples
pageSetup
Set page margins,orientation and print scaling
Description
Set page margins, orientation and print scaling
Usage
pageSetup(wb, sheet, orientation = "portrait", scale = 100, left = 0.7,
right = 0.7, top = 0.75, bottom = 0.75, header = 0.3, footer = 0.3,
fitToWidth = FALSE, fitToHeight = FALSE)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
orientation
Page orientation. One of "portrait"or "landscape"
scale
Print scaling. Numeric value between 10 and 400
left
left page margin in inches
right
right page margin in inches
top
top page margin in inches
bottom
bottompage margin in inches
header
header margin in inches
footer
footermargin in inches
fitToWidth
If TRUE, worksheet is scaled to fit to page width on printing.
fitToHeight
If TRUE, worksheet is scaled to fit to page height on printing.
Author(s)
Alexander Walker
VB.NET PDF replace text library: replace text in PDF content in vb
and ASP.NET webpage. Find and replace text in PDF file in preview without adobe PDF reader component installed. Able to pull text
search text in pdf image; find and replace text in pdf file
VB.NET PDF File Merge Library: Merge, append PDF files in vb.net
When you have downloaded the RasterEdge Image SDK for .NET, you can unzip the package to find the RasterEdge.Imaging.PDF.dll in the bin folder under the root
pdf search and replace text; pdf editor with search and replace text
read.xlsx
33
Examples
wb <- createWorkbook()
addWorksheet(wb, "S1")
addWorksheet(wb, "S2")
writeDataTable(wb, 1, x = iris[1:30,])
writeDataTable(wb, 2, x = iris[1:30,], xy = c("C", 5))
## landscape page scaled to 50%
pageSetup(wb, sheet = 1, orientation = "landscape", scale = 50)
## portrait page scales to 300% with 0.5in left and right margins
pageSetup(wb, sheet = 2, orientation = "portrait", scale = 300, left= 0.5, right = 0.5)
saveWorkbook(wb, "pageSetupExample.xlsx", overwrite = TRUE)
read.xlsx
Read data from an Excel file or Workbook object into a data.frame
Description
Read data from an Excel file or Workbook object into a data.frame
Usage
read.xlsx(xlsxFile, sheet = 1, startRow = 1, colNames = TRUE,
rowNames = FALSE, detectDates = FALSE, skipEmptyRows = TRUE,
rows = NULL, cols = NULL, check.names = FALSE, namedRegion = NULL)
Arguments
xlsxFile
An xlsx file or Workbook object
sheet
The name or index of the sheet to read data from.
startRow
first row to begin looking for data. Empty rows at the top of a file are always
skipped,regardless of the value ofstartRow.
colNames
If TRUE, the first row ofdata will be used as column names.
rowNames
If TRUE, first column ofdata will be used as row names.
detectDates
If TRUE, attempt to recognise dates and perform conversion.
skipEmptyRows If TRUE, empty rows are skipped else empty rows after the first row containing
data will return a row of NAs.
rows
Anumeric vector specifying which rows in the Excel file to read. If NULL, all
rows are read.
cols
Anumeric vector specifying which columns in the Excel file to read. If NULL,
all columns are read.
check.names
logical. If TRUE then the names of the variables in the data frame are checked
to ensure that they are syntactically valid variable names
namedRegion
Anamedregionin theWorkbook. IfnotNULL startRow,rows and cols paramters
are ignored.
VB.NET PDF File & Page Process Library SDK for vb.net, ASP.NET
document. If you find certain page in your PDF document is unnecessary, you may want to delete this page directly. Moreover, when
pdf find highlighted text; how to select all text in pdf
VB.NET Create PDF Library SDK to convert PDF from other file
Create writable PDF file from text (.txt) file in VB.NET project. you can download the RasterEdge .NET Image SDK and find the PDF processing component DLL
how to select text in pdf; how to select text in pdf and copy
34
readWorkbook
Details
Formulae written using writeFormula to a Workbook object will not get picked up by read.xlsx().
This is because onlythe formula is written and left to be evaluated when the file is opened in Excel.
Opening,saving and closing the file with Excel will resolve this.
Value
data.frame
Author(s)
Alexander Walker
See Also
getNamedRegions
Examples
xlsxFile <- system.file("readTest.xlsx", package = "openxlsx")
df1 <- read.xlsx(xlsxFile = xlsxFile, sheet = 1, skipEmptyRows = FALSE)
sapply(df1, class)
df2 <- read.xlsx(xlsxFile = xlsxFile, sheet = 3, skipEmptyRows = TRUE)
df2$Date <- convertToDate(df2$Date)
sapply(df2, class)
head(df2)
df2 <- read.xlsx(xlsxFile = xlsxFile, sheet = 3, skipEmptyRows = TRUE,
detectDates = TRUE)
sapply(df2, class)
head(df2)
#wb <- loadWorkbook(system.file("readTest.xlsx", package = "openxlsx"))
#df3 <- read.xlsx(wb, sheet = 2, skipEmptyRows = FALSE, colNames = TRUE)
#df4 <- read.xlsx(xlsxFile, sheet = 2, skipEmptyRows = FALSE, colNames = TRUE)
#all.equal(df3, df4)
#wb <- loadWorkbook(system.file("readTest.xlsx", package = "openxlsx"))
#df3 <- read.xlsx(wb, sheet = 2, skipEmptyRows = FALSE,
# cols = c(1, 4), rows = c(1, 3, 4))
readWorkbook
Read data from aworksheet into a data.frame
Description
Read data from a worksheet into a data.frame
C# HTML5 PDF Viewer SDK deployment on Visual Studio .NET
Unzip the download package and you can find a project XDoc.PDF.HTML5 Viewer Demo or XDoc.PDF.HTML5 Editor Once done debugging with x86 dlls, replace the x86
search pdf for text; find text in pdf image
VB.NET PDF - Deploy VB.NET HTML5 PDF Viewer on Visual Studio.NET
to How to Build Online VB.NET PDF Viewer in Unzip the download package and you can find a project named XDoc Once done debugging with x86 dlls, replace the x86
text select tool pdf; convert pdf to searchable text online
readWorkbook
35
Usage
readWorkbook(xlsxFile, sheet = 1, startRow = 1, colNames = TRUE,
rowNames = FALSE, detectDates = FALSE, skipEmptyRows = TRUE,
rows = NULL, cols = NULL, check.names = FALSE, namedRegion = NULL)
Arguments
xlsxFile
An xlsx file
sheet
The name or index of the sheet to read data
startRow
first row to begin looking for data. Empty rows at the top of a file are always
skipped,regardless of the value ofstartRow.
colNames
If TRUE, first rowof data will be used as column names.
rowNames
If TRUE, first column ofdata will be used as row names.
detectDates
If TRUE, attempt to recognise dates and perform conversion.
skipEmptyRows If TRUE, empty rows are skipped else empty rows after the first row containing
data will return a row of NAs
rows
Anumeric vector specifying which rows in the Excel file to read. If NULL, all
rows are read.
cols
Anumeric vector specifying which columns in the Excel file to read. If NULL,
all columns are read.
check.names
logical. If TRUE then the names of the variables in the data frame are checked
to ensure that they are syntactically valid variable names
namedRegion
Anamedregionin theWorkbook. IfnotNULL startRow,rows and cols paramters
are ignored.
Details
Creates a data.frame ofall data in worksheet.
Value
data.frame
Author(s)
Alexander Walker
See Also
getNamedRegions
read.xlsx
C# PDF File Permission Library: add, remove, update PDF file
Text: Replace Text in PDF. Image: Insert Image to PDF. Image: Remove Image from using RasterEdge.XDoc.PDF; In the following code table, you will find a piece of
how to make a pdf document text searchable; how to select text in pdf reader
VB.NET PDF File Permission Library: add, remove, update PDF file
to PDF. Text: Delete Text from PDF. Text: Replace Text in PDF. In the following code table, you will find a VB NET code sample for how to set PDF file permissions
select text in pdf reader; search text in multiple pdf
36
removeCellMerge
Examples
xlsxFile <- system.file("readTest.xlsx", package = "openxlsx")
df1 <- readWorkbook(xlsxFile = xlsxFile, sheet = 1)
xlsxFile <- system.file("readTest.xlsx", package = "openxlsx")
df1 <- readWorkbook(xlsxFile = xlsxFile, sheet = 1, rows = c(1, 3, 5), cols = 1:3)
removeCellMerge
Create a new Workbook object
Description
Unmerges any merged cells that intersect with the region specified by, min(cols):max(cols) X
min(rows):max(rows)
Usage
removeCellMerge(wb, sheet, cols, rows)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
cols
vector of column indices
rows
vector of row indices
Author(s)
Alexander Walker
See Also
mergeCells
removeColWidths
37
removeColWidths
Remove custom column widths from a worksheet
Description
Remove custom column widths from a worksheet
Usage
removeColWidths(wb, sheet, cols)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
cols
Indices of colunss to remove custom width (if any) from.
Author(s)
Alexander Walker
See Also
setColWidths
Examples
## Create a new workbook
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package = "openxlsx"))
## remove column widths in columns 1 to 20
removeColWidths(wb, 1, cols = 1:20)
saveWorkbook(wb, "removeColWidthsExample.xlsx", overwrite = TRUE)
removeComment
Remove a comment froma cell
Description
Remove a comment from a cell
Usage
removeComment(wb, sheet, cols, rows, gridExpand = TRUE)
38
removeFilter
Arguments
wb
Aworkbook object
sheet
Avector of names or indices of worksheets
cols
Columns to delete comments from
rows
Rows to delete comments from
gridExpand
If TRUE, all data in rectangle min(rows):max(rows) X min(cols):max(cols) will
be removed.
See Also
createComment
writeComment
removeFilter
removes worksheet filter from addFilter and writeData
Description
removes worksheet filter from addFilterand writeData
Usage
removeFilter(wb, sheet)
Arguments
wb
Aworkbook object
sheet
Avector of names or indices of worksheets
Examples
wb <- createWorkbook()
addWorksheet(wb, "Sheet 1")
addWorksheet(wb, "Sheet 2")
addWorksheet(wb, "Sheet 3")
writeData(wb, 1, iris)
addFilter(wb, 1, row = 1, cols = 1:ncol(iris))
## Equivalently
writeData(wb, 2, x = iris, withFilter = TRUE)
## Similarly
writeDataTable(wb, 3, iris)
## remove filters
removeRowHeights
39
removeFilter(wb, 1:2) ## remove filters
removeFilter(wb, 3) ## Does not affect tables!
saveWorkbook(wb, file = "removeFilterExample.xlsx", overwrite = TRUE)
removeRowHeights
Remove custom row heights from a worksheet
Description
Remove custom row heights froma worksheet
Usage
removeRowHeights(wb, sheet, rows)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
rows
Indices of rows to remove customheight (if any) from.
Author(s)
Alexander Walker
See Also
setRowHeights
Examples
## Create a new workbook
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package = "openxlsx"))
## remove any custom row heights in rows 1 to 10
removeRowHeights(wb, 1, rows = 1:10)
saveWorkbook(wb, "removeRowHeightsExample.xlsx", overwrite = TRUE)
40
renameWorksheet
removeWorksheet
Remove a worksheet from a workbook
Description
Remove a worksheet from a workbook
Usage
removeWorksheet(wb, sheet)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
Author(s)
Alexander Walker
Examples
## load a workbook
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package = "openxlsx"))
## Remove sheet 2
removeWorksheet(wb, 2)
## save the modified workbook
saveWorkbook(wb, "removeWorksheetExample.xlsx", overwrite = TRUE)
renameWorksheet
Rename an exisiting worksheet
Description
Rename an exisiting worksheet
Usage
renameWorksheet(wb, sheet, newName)
Arguments
wb
AWorkbook object containing a worksheet
sheet
The name or index of the worksheet to rename
newName
The new name of the worksheet. No longerthan31 chars.
Documents you may be interested
Documents you may be interested