how to open a .pdf file in a panel or iframe using asp.net c# : Extract text from pdf image Library software class asp.net winforms web page ajax googlespreadsheetprogramming-sample6-part770

AppendixA:ExcelVBAAndGoogleAppsScriptComparison
56
1
Public Sub PrintSheetNames()
2
Dim sheets As Worksheets
3
Dim sheet As Worksheet
4
For Each sheet In ActiveWorkbook.Sheets
5
Debug.Print sheet.Name
6
Next sheet
7
End Sub
GoogleAppsScript
1
// Print the names of all sheets in the active
2
// spreadsheet.
3
function printSheetNames() {
4
var ss SpreadsheetApp.getActiveSpreadsheet(),
5
sheets = ss.getSheets(),
6
i;
7
for (i = 0; i sheets.length; i += 1) {
8
Logger.log(sheets[i].getName());
9
}
10
}
AddingAnd RemovingSheets
Spreadsheetapplicationsmayneedtoaddnewsheetstoanexisting
spreadsheetfileandthen,aftersomeprocessing,theymayneedto
thenremoveone ormoresheets.Bothtasksare easilyachievedin
bothVBAandandGoogleAppsScript.
VBA
Extract text from pdf image - extract text content from PDF file in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Feel Free to Extract Text from PDF Page, Page Region or the Whole PDF File
copy text from protected pdf; cut and paste text from pdf
Extract text from pdf image - VB.NET PDF Text Extract Library: extract text content from PDF file in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
How to Extract Text from PDF with VB.NET Sample Codes in .NET Application
export text from pdf to excel; c# read text from pdf
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
57
1
Add a a new sheet to a a workbook.
2
Call the Add method d of the
3
Worksheets collection
4
Assign a a name to the returned
5
Worksheet instance
6
'
Name property.
7
Sub AddNewSheet()
8
Dim newSheet As Worksheet
9
Set newSheet = ActiveWorkbook.Worksheets.Add
10
newSheet.Name "AddedSheet"
11
MsgBox "New Sheet t Added!"
12
End Sub
13
14
Delete a a named d sheet t from the
15
active spreadsheet.
16
The sheet t to o delete e is identified
17
'
in the Worksheets collection
18
by name. . The returned instance
19
is deleted by y calling its
20
Delete method.
21
MS Excel l will prompt to confirm.
22
Sub RemoveSheet()
23
Dim sheetToRemove As Worksheet
24
Set sheetToRemove = _
25
ActiveWorkbook.Worksheets("AddedSheet")
26
sheetToRemove.Delete
27
MsgBox "Sheet Deleted!"
28
End Sub
GoogleAppsScript
C# PDF Image Extract Library: Select, copy, paste PDF images in C#
Image: Extract Image from PDF. |. Home ›› XDoc.PDF ›› C# PDF: Extract PDF Image. How to C#: Extract Image from PDF Document.
delete text from pdf acrobat; copy text from pdf to word
VB.NET PDF Image Extract Library: Select, copy, paste PDF images
Image: Extract Image from PDF. |. Home ›› XDoc.PDF ›› VB.NET PDF: Extract PDF Image. VB.NET PDF - Extract Image from PDF Document in VB.NET.
copy text from pdf reader; .net extract text from pdf
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
58
1
// Add a new sheet to the active spreadsheet.
2
// Get an instance of the active spreadsheet.
3
// Call its insertSheet method.
4
// Call the setName method of the
5
// returned instance.
6
function addNewSheet() {
7
var ss =
8
SpreadsheetApp.getActiveSpreadsheet(),
9
newSheet;
10
newSheet = ss.insertSheet();
11
newSheet.setName("AddedSheet");
12
Browser.msgBox("New Sheet t Added!");
13
}
14
15
// Remove a named sheet from the
16
// active spreadsheet.
17
// Get an instance of the active
18
// spreadsheet.
19
// Get an instance of the sheet to remove.
20
// Activate the sheet to remove
21
// Call the spreadsheet instance method
22
//
deleteActiveSheet.
23
function removeSheet() {
24
var ss =
25
SpreadsheetApp.getActiveSpreadsheet(),
26
sheetToRemove =
27
ss.getSheetByName("AddedSheet");
28
sheetToRemove.activate();
29
ss.deleteActiveSheet();
30
Browser.msgBox("SheetDeleted!");
31
}
Thecodecommentsinbothlanguagesshouldadequatelydescribe
the actions and objects required to addand remove sheets from
bothspreadsheetapplications.TheGoogleAppsScriptmechanism
C# PDF insert image Library: insert images into PDF in C#.net, ASP
Free PDF image processing SDK library for Visual Studio .NET program. Powerful .NET PDF image edit control, enable users to insert vector images to PDF file.
copy text from scanned pdf; a pdf text extractor
VB.NET PDF insert image library: insert images into PDF in vb.net
VB.NET code to add an image to the inputFilePath As String = Program.RootPath + "\\" 1.pdf" Dim doc New PDFDocument(inputFilePath) ' Get a text manager from
get text from pdf c#; extract text from pdf using c#
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
59
appearsalittlemorecomplicatedthanitsVBAequivalent.Inorder
toremoveasheet,itfirsthastobeactivatedsothattheSpreadsheet
instancemethoddeleteActiveSheet()canbecalled.Otherwise,both
languagesworkquitesimilarly.
HidingAndUnhidingSheets
Hidingsheetscanhelptokeepaspreadsheetunclutteredandeasyto
usewhilealsohelpingtopreventinadvertentchangestoimportant
data.Listsofvaluesthattheapplicationusesmaynotbeimportant
to the users so they can be hidden from their view while still
remainingavailableto theapplicationcode.TheVBAandGoogle
AppsScriptcoderequiredtodothehiding,unhidingandlistingof
hiddensheetsisverysimilar.
Hidingasheetidentifiedbyname.
VBA
1
Public Sub SheetHide()
2
Dim sh As Worksheet
3
Set sh = Worksheets.Item("ToHide")
4
sh.Visible = False
5
End Sub
GoogleAppsScript
C# Create PDF from images Library to convert Jpeg, png images to
If you want to turn PDF file into image file format in C# application, then RasterEdge XDoc.PDF for .NET can also help with this.
export highlighted text from pdf; copy paste text pdf
C# PDF insert text Library: insert text into PDF content in C#.net
Text to PDF. C#.NET PDF SDK - Insert Text to PDF Document in C#.NET. Providing C# Demo Code for Adding and Inserting Text to PDF File Page with .NET PDF Library.
extract text from pdf with formatting; copy text pdf
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
60
1
// Hide a sheet specified by its name.
2
function sheetHide() {
3
var ss =
4
SpreadsheetApp.getActiveSpreadsheet(),
5
sh = ss.getSheetByName('ToHide');
6
sh.hideSheet()
7
}
Listinghiddensheets
VBA
1
Public Sub ListHiddenSheetNames()
2
Dim sheet As Worksheet
3
For Each sheet In Worksheets
4
If sheet.Visible = False Then
5
Debug.Print sheet.Name
6
End If
7
Next sheet
8
End Sub
GoogleAppsScript
1
// Write a list of hidden sheet names to log.
2
function listHiddenSheetNames() {
3
var ss =
4
SpreadsheetApp.getActiveSpreadsheet(),
5
sheets = ss.getSheets();
6
sheets.forEach(
7
function (sheet) {
8
if (sheet.isSheetHidden()) {
9
Logger.log(sheet.getName());
10
}
11
});
12
}
C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net
Page: Extract, Copy and Paste PDF Pages. Easy to Use C# Code to Extract PDF Pages, Copy Pages from One PDF File and Paste into Others in C#.NET Program.
export text from pdf to word; copy paste pdf text
VB.NET PDF Form Data Read library: extract form data from PDF in
featured PDF software, it should have functions for processing text, image as well how to read or retrieve field data from PDF and how to extract and get
extract text from image pdf file; copy text from pdf in preview
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
61
Unhidinghiddensheets
VBA
1
Public Sub SheetsUnhide()
2
Dim sheet As Worksheet
3
For Each sheet In Worksheets
4
If sheet.Visible = False Then
5
sheet.Visible = True
6
End If
7
Next sheet
8
End Sub
GoogleAppsScript
1
// Unhide all hidden sheets.
2
function sheetsUnhide() {
3
var ss =
4
SpreadsheetApp.getActiveSpreadsheet(),
5
sheets = ss.getSheets();
6
sheets.forEach(
7
function (sheet) {
8
if (sheet.isSheetHidden()) {
9
sheet.showSheet();
10
}
11
});
12
}
The main difference in the approach taken by each language in
these examplesishowtheyiterateover theWorksheetscollection
in VBA and the array of Sheet objects in Google Apps Script.
Newer versionsofJavaScript, including GoogleAppsScript, have
added some very powerful methods to arrays. Includedin these
are methodsthattake acallback functionasanargumentthatis
invokedforeachelementinthearray.TheforEach()methodabove
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
62
isanexample.ItoperatesinasimilarmannertotheVBAForEach
loop butunlike it, forEach()needsa functionasanargument. In
theexamplesaboveanonymousfunctionswereused.Thistype of
approachwherefunctionstakeotherfunctionsasargumentsisvery
powerfulbutmaybeunfamiliartoVBAprogrammers.
ProtectingSheets
Hidingsheetsprovidesatype of“securitythroughobscurity”but
does not prevent deliberate tampering. Both VBA and Google
Apps Script allow you to protect individual worksheetswithin a
spreadsheetbuttheytakeveryapproachestothis.
VBA
1
Password-protect rotect t a a sheet identified
2
by name
3
Public Sub SheetProtect()
4
Dim sh As Worksheet
5
Dim pwd As String: pwd "secret"
6
Set sh = Worksheets.Item("ToProtect")
7
sh.Protect pwd
8
End Sub
GoogleAppsScript
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
63
1
// Identify a sheet by name to protect
2
// When this code runs, the lock icon
3
// will appear on the sheet name.
4
// Share the spreadsheet with another user
5
// as an editor. That user can edit all
6
// sheets except the protected one. The user
7
// can still edit the protected sheet.
8
function sheetProtect() {
9
var ss =
10
SpreadsheetApp.getActiveSpreadsheet(),
11
sh = ss.getSheetByName('ToProtect'),
12
permissions = sh.getSheetProtection();
13
ss.addEditor(<gmail address goes here>);
14
permissions.setProtected(true);
15
sh.setSheetProtection(permissions);
16
}
InVBA,apasswordissetandtheprotectedisusingtheWorksheet
Protect method passing it the password string as an argument.
Onceprotectedeventhespreadsheetfileownerneedstoknowthe
password to do anything to the sheet. Google Apps Script takes
adifferent approach. By default, only the file creator can see or
editthespreadsheet.Theownercanthenaddeditorsorviewersto
thespreadsheet.A viewercansee allthe sheetsbutnoteditthem
whiletheeditorcan,asthenamesuggests,editthesheetcontents.
However,asinglesheetcanbeprotectedsothatitcanbeviewedby
ausergrantededitorprivilegebutisnoteditablebythem.Thecode
examplegivenaboveshowshowthiscanbedone.UnlikeinVBA,
however, the owner ofthe spreadsheetwillalways have fulledit
permissionsonallsheets.Inotherwords,theownercannotremove
permissionsfromthemselves.
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
64
Ranges
Spreadsheetprogrammingislargelyaboutmanipulatingrangesso
thisisalongsection.
Selection
Requiring auser toselectaninput range isacommonfeature of
spreadsheetapplications.Inordertoprocessthe selectedcells,the
applicationneedstodetermine:
• Thesheetcontainingtheselection
• Thelocationoftheselectionwithinthesheetasgivenbyits
address
• The dimensionsoftheselection,thatisthenumberofrows
andcolumnsintheselection
Thisinformationisextractedandprintedinthefollowingexamples
VBA
1
Public Sub PrintSelectionDetails()
2
Debug.Print "Selected Range e Details: "
3
Debug.Print "-- Sheet: : " & _
4
Selection.Worksheet.Name
5
Debug.Print "-- Address: " & _
6
Selection.Address
7
Debug.Print "-- Row Count: : " & _
8
Selection.Rows.Count
9
Debug.Print "'-- Column Count: : " & _
10
Selection.Columns.Count
11
End Sub
GoogleAppsScript
AppendixA:ExcelVBAAndGoogleAppsScriptComparison
65
1
// Prints details about selected range in
2
// active spreadsheet
3
// To run, paste code into script editor,
4
//
select some cells on any sheet,
5
//
execute code and
6
//
check log to see details
7
// Prints details about selected range
8
// in active spreadsheet
9
// To run, paste code into script editor,
10
//
select some cells on any sheet,
11
// execute code and
12
//
check log to see details
13
function printSelectionDetails() {
14
var ss =
15
SpreadsheetApp.getActiveSpreadsheet(),
16
selectedRng = ss.getActiveRange();
17
Logger.log('Selected Range Details:');
18
Logger.log('-- Sheet: '
19
selectedRng
20
.getSheet()
21
.getSheetName());
22
Logger.log('-- Address: '
23
selectedRng.getA1Notation());
24
Logger.log('-- Row Count: '
25
((selectedRng.getLastRow() + 1)
26
selectedRng.getRow()));
27
Logger.log('-- Column Count: '
28
((selectedRng.getLastColumn() + 1)
29
selectedRng.getColumn()));
30
}
VBA providesthe handySelection object which is oftype Range
anditsmethodscanbe usedto extractthe requiredinformation.
TheGoogleAppsScriptSpreadsheetobjectprovidesthegetActiveS-
election()methodtoreturnthe GoogleSpreadsheetsequivalentto
Documents you may be interested
Documents you may be interested