I am trying to paste part of an excel spreadsheet into Notes but only 68 of the 169 rows will paste. Is there a way around this limit?
Subject: Use Edit > Paste Special > HTML, not just Paste
If you’re simply copy/pasting manually, then use the Edit > Paste Special option to paste and pick HTML from the choices.
Pasting with CTRL-V (simple paste) pastes the spreadsheet as a graphic instead and limits the number of lines.
Subject: Not pasting all rows from Excel
Hi Daniel, if i understand right, you want to paste from an spreadsheet with, let´s say 100 rows only the rows 45 to 77? Take a look at this. You have only to modify the integer vaule of intZeile to set the starting position of the import and change the end of the DO WHILE from the last row (xlSpalten ) to the row you want.
Hope it helps
Best regards
Frank
'Open Excel not visible
Excel.Visible = False
Print "Opening " & strXlFilename & "..."
'OPen Excelfile
Excel.Workbooks.Open strXlFilename
Set xlWorkbook = Excel.ActiveWorkbook
Set xlSheet = xlWorkbook.ActiveSheet
'Getting the last used Cell and reading it row and column
xlSheet.Cells.SpecialCells(11).Activate
xlZeilen = Excel.ActiveWindow.ActiveCell.row
xlSpalten = Excel.ActiveWindow.ActiveCell.Column
'printing the found values for last row and column just for test/info
Messagebox "Zeilenanzahl: " + Str(xlZeilen) + " Spaltenanzahl: " + Str(xlSpalten),,"Zeilen /Spalten"
'This is the starting Row in the Excelfile
intZeile = 0
Print "Starte Import aus Exceldate..."
Do While intZeile < xlZeilen
With xlSheet
intZeile = intZeile + 1
Set vw_Import = db_Import.GetView("Main View")
'Create new document
Set doc = db_Import.CreateDocument
doc.Form = "frm_Import2"
'Taking Values from Excel and put it in the doc Fields
doc.fld1 = .Cells( intZeile, 1 ).Value
doc.fld2 = .Cells(intZeile, 2 ).Value
doc.fld3= .Cells(intZeile, 3).Value
doc.fld4= .Cells( intZeile, 4 ).Value
'Save the new Document
Call doc.Save( True, True )
End With
Loop