getCellRefs
21
modifyBaseFont(wb, fontSize = 10, fontColour = "#FF0000", fontName = "Arial Narrow")
getBaseFont(wb)
getCellRefs
Return excel cell coordinates from (x,y) coordinates
Description
Return excel cell coordinates from (x,y)coordinates
Usage
getCellRefs(cellCoords)
Arguments
cellCoords
Adata.frame with two columns coordinate pairs.
Value
Excel alphanumeric cell reference
Author(s)
Alexander Walker
getDateOrigin
Return the date origin used internally by an xlsx or xlsm file
Description
Return the date origin used internally by an xlsx or xlsm file
Usage
getDateOrigin(xlsxFile)
Arguments
xlsxFile
An xlsx or xlsm file.
Details
Excel stores dates as the number of days from either 1904-01-01 or 1900-01-01. This function
checks the date originbeing usedin anExcel file and returns is so itcan be used inconvertToDate
Pdf text search - 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
search text in pdf image; search pdf for text in multiple files
Pdf text search - 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 searchable text converter; pdf text searchable
22
getNamedRegions
Value
One of "1900-01-01" or "1904-01-01".
Author(s)
Alexander Walker
See Also
convertToDate
Examples
## create a file with some dates
write.xlsx(as.Date("2015-01-10") - (0:4), file = "getDateOriginExample.xlsx")
m <- read.xlsx("getDateOriginExample.xlsx")
## convert to dates
do <- getDateOrigin(system.file("readTest.xlsx", package = "openxlsx"))
convertToDate(m[[1]], do)
getNamedRegions
Get named regions in an xlsx file.
Description
Get named regions in an xlsx file.
Usage
getNamedRegions(xlsxFile)
Arguments
xlsxFile
An xlsx file or Workbook object
Examples
##getNamedRegions
C# Word - Search and Find Text in Word
C# Word - Search and Find Text in Word. Learn How to Search Text in PDF Document and Obtain Text Content and Location Information. Overview.
pdf searchable text converter; how to make pdf text searchable
C# PowerPoint - Search and Find Text in PowerPoint
C# PowerPoint - Search and Find Text in PowerPoint. Learn How to Search Text in PDF Document and Obtain Text Content and Location Information. Overview.
pdf find text; cannot select text in pdf file
getSheetNames
23
getSheetNames
Returns the worksheet names within an xlsx file
Description
Returns the worksheet names within an xlsx file
Usage
getSheetNames(file)
Arguments
file
An xlsx or xlsm file.
Value
Character vector ofworksheet names.
Author(s)
Alexander Walker
Examples
getSheetNames(system.file("readTest.xlsx", package = "openxlsx"))
getStyles
Returns a list of all styles in the workbook
Description
Returns a list of all styles in the workbook
Usage
getStyles(wb)
Arguments
wb
Aworkbook object
Author(s)
Alexander Walker
C# PDF delete text Library: delete, remove text from PDF file in
The following C# coding example illustrates how to perform PDF text deleting function in your .NET project, according to search option. // Open a document.
how to search text in pdf document; convert pdf to word searchable text
C# PDF replace text Library: replace text in PDF content in C#.net
The following C# coding example illustrates how to perform PDF text replacing function in your .NET project, according to search option. // Open a document.
search pdf documents for text; select text in pdf file
24
insertImage
See Also
replaceStyle
Examples
## load a workbook
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package = "openxlsx"))
getStyles(wb)[1:3]
insertImage
Insert an image into a worksheet
Description
Insert an image into a worksheet
Usage
insertImage(wb, sheet, file, width = 6, height = 3, startRow = 1,
startCol = 1, units = "in", dpi = 300)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
file
An image file. Valid file types are: jpeg, png, bhp
width
Width of figure.
height
Height offigure.
startRow
Row coordinate ofupper left corner of the image
startCol
Column coordinate ofupper left corner of the image
units
Units of width and height. Can be "in", "cm"or "px"
dpi
Image resolution used for conversion between units.
Author(s)
Alexander Walker
See Also
insertPlot
VB.NET PDF replace text library: replace text in PDF content in vb
The following coding example illustrates how to perform PDF text replacing function in your VB.NET project, according to search option.
how to select text on pdf; search pdf for text in multiple files
VB.NET PDF- View PDF Online with VB.NET HTML5 PDF Viewer
PDF Read. Text: Extract Text from PDF. Text: Search Text in PDF. Image: Extract Image from PDF. Easy to search PDF text in whole PDF document.
search a pdf file for text; convert a scanned pdf to searchable text
insertPlot
25
Examples
## Create a new workbook
wb <- createWorkbook("Ayanami")
## Add some worksheets
addWorksheet(wb, "Sheet 1")
addWorksheet(wb, "Sheet 2")
addWorksheet(wb, "Sheet 3")
## Insert images
img <- system.file("einstein.jpg", package = "openxlsx")
insertImage(wb, "Sheet 1", img, startRow = 5, startCol = 3, width = 6, height = 5)
insertImage(wb, 2, img, startRow = 2, startCol = 2)
insertImage(wb, 3 , img, width = 15, height = 12, startRow = 3, startCol = "G", units = "cm")
## Save workbook
saveWorkbook(wb, "insertImageExample.xlsx", overwrite = TRUE)
insertPlot
Insert the current plot into a worksheet
Description
The current plot is saved to a temporary image file using dev.copy. This file is then written to the
workbook using insertImage.
Usage
insertPlot(wb, sheet, width = 6, height = 4, xy = NULL, startRow = 1,
startCol = 1, fileType = "png", units = "in", dpi = 300)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
width
Width of figure. Defaults to 6in.
height
Height offigure . Defaults to 4in.
xy
Alternate way to specify startRow and startCol. A vector of length 2 of form
(startcol, startRow)
startRow
Row coordinate ofupper left corner of figure. xy[[2]] when xy is given.
startCol
Column coordinate ofupper left corner of figure. xy[[1]] when xy is given.
fileType
File type of image
units
Units of width and height. Can be "in", "cm"or "px"
dpi
Image resolution
C# PDF Text Highlight Library: add, delete, update PDF text
The following C# coding example illustrates how to perform PDF text highlight function in your .NET project, according to search option. // Open a document.
select text in pdf; find and replace text in pdf
C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
Page: Rotate a PDF Page. PDF Read. Text: Extract Text from PDF. Text: Search Text in PDF. Easy to search PDF text in whole PDF document.
text searchable pdf file; converting pdf to searchable text format
26
int2col
Author(s)
Alexander Walker
See Also
insertImage
Examples
## Not run:
## Create a new workbook
wb <- createWorkbook()
## Add a worksheet
addWorksheet(wb, "Sheet 1", gridLines = FALSE)
## create plot objects
require(ggplot2)
p1 <- qplot(mpg, data=mtcars, geom="density",
fill=as.factor(gear), alpha=I(.5), main="Distribution of Gas Mileage")
p2 <- qplot(age, circumference,
data = Orange, geom = c("point", "line"), colour = Tree)
## Insert currently displayed plot to sheet 1, row 1, column 1
print(p1) #plot needs to be showing
insertPlot(wb, 1, width = 5, height = 3.5, fileType = "png", units = "in")
## Insert plot 2
print(p2)
insertPlot(wb, 1, xy = c("J", 2), width = 16, height = 10, fileType = "png", units = "cm")
## Save workbook
saveWorkbook(wb, "insertPlotExample.xlsx", overwrite = TRUE)
## End(Not run)
int2col
Convert integer to Excel column
Description
Converts an integer to an Excel columnlabel.
Usage
int2col(x)
Arguments
x
Anumeric vector
loadWorkbook
27
Examples
int2col(1:10)
loadWorkbook
Load an exisiting.xlsx file
Description
loadWorkbookreturns a workbook objectconserving styles andformattingofthe original .xlsxfile.
Usage
loadWorkbook(file, xlsxFile = NULL)
Arguments
file
Apath to an existing .xlsx or.xlsm file
xlsxFile
alias for file
Value
Workbook object.
Author(s)
Alexander Walker
See Also
removeWorksheet
Examples
## load existing workbook from package folder
wb <- loadWorkbook(file = system.file("loadExample.xlsx", package= "openxlsx"))
names(wb) #list worksheets
wb ## view object
## Add a worksheet
addWorksheet(wb, "A new worksheet")
## Save workbook
saveWorkbook(wb, "loadExample.xlsx", overwrite = TRUE)
28
mergeCells
mergeCells
Merge cells within a worksheet
Description
Merge cells withina worksheet
Usage
mergeCells(wb, sheet, cols, rows)
Arguments
wb
Aworkbook object
sheet
Aname or indexof a worksheet
cols
Columns to merge
rows
corresponding rows to merge
Details
As merged region must be rectangular, only min and max of cols and rows are used.
Author(s)
Alexander Walker
See Also
removeCellMerge
Examples
## Create a new workbook
wb <- createWorkbook()
## Add a worksheet
addWorksheet(wb, "Sheet 1")
addWorksheet(wb, "Sheet 2")
## Merge cells: Row 2 column C to F (3:6)
mergeCells(wb, "Sheet 1", cols = 2, rows = 3:6)
## Merge cells:Rows 10 to 20 columns A to J (1:10)
mergeCells(wb, 1, cols = 1:10, rows = 10:20)
## Intersecting merges
mergeCells(wb, 2, cols = 1:10, rows = 1)
mergeCells(wb, 2, cols = 5:10, rows = 2)
modifyBaseFont
29
mergeCells(wb, 2, cols = c(1,10), rows = 12) ## equivalent to 1:10 as only min/max are used
#mergeCells(wb, 2, cols = 1, rows = c(1,10)) # Throws error because intersects existing merge
## remove merged cells
removeCellMerge(wb, 2, cols = 1, rows = 1) # removes any intersecting merges
mergeCells(wb, 2, cols = 1, rows = 1:10) # Now this works
## Save workbook
saveWorkbook(wb, "mergeCellsExample.xlsx", overwrite = TRUE)
modifyBaseFont
Modify the default font
Description
Base font is black,size 11,Calibri
Usage
modifyBaseFont(wb, fontSize = 11, fontColour = "black",
fontName = "Calibri")
Arguments
wb
Aworkbook object
fontSize
font size
fontColour
font colour
fontName
Name of a font
Details
The font name is not validated in anyway. Excel replaces unknown font names with Arial.
Author(s)
Alexander Walker
Examples
## create a workbook
wb <- createWorkbook()
addWorksheet(wb, "S1")
## modify base font to size 10 Arial Narrow in red
modifyBaseFont(wb, fontSize = 10, fontColour = "#FF0000", fontName = "Arial Narrow")
writeData(wb, "S1", iris)
writeDataTable(wb, "S1", x = iris, startCol = 10) ## font colour does not affect tables
saveWorkbook(wb, "modifyBaseFontExample.xlsx", overwrite = TRUE)
30
openXL
names
get or set worksheet names
Description
get or set worksheet names
Usage
## S3 method for class Workbook
names(x)
## S3 replacement method for class Workbook
names(x) <- value
Arguments
x
AWorkbook object
value
acharacter vector the same length as wb
Examples
wb <- createWorkbook()
addWorksheet(wb, "S1")
addWorksheet(wb, "S2")
addWorksheet(wb, "S3")
names(wb)
names(wb)[[2]] <- "S2a"
names(wb)
names(wb) <- paste("Sheet", 1:3)
openXL
Open a Microsoft Excel file (xls/xlsx)or an openxlsx Workbook
Description
This function tries to open a Microsoft Excel (xls/xlsx) file or an openxlsx Workbook with the
proper application,in a portable manner.
In Windows (c) and Mac (c),it uses system default handlers,given the file type.
InLinux it searches (viawhich)foravailablexls/xlsxreaderapplications (unless options(openxlsx.excelApp)
is set to the app bin path), and if it founds anything, sets options(openxlsx.excelApp) to the
program choosed by the user via a menu (if many are present, otherwise it will set the only avail-
able). Currentlysearched forapps areLibreoffice/Openoffice(sofficebin),Gnumeric (gnumeric)
and Calligra Sheets (calligrasheets).
Documents you may be interested
Documents you may be interested