How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

forum.advanced.programming (1998-2005)
michael
Germany
Posts: 280
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

Post by michael » 08 Dec 2004, 13:44

 Posted by:  Michael Hummel 

Hello NG,

it would be nice to copy the cell in excel and paste the value into a
SalTbl or MTbl Cell.
When i try this, pasting results in an empty cell.

thank you

Sebastien Huleux

Re: How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

Post by Sebastien Huleux » 08 Dec 2004, 15:16

 Posted by:  Sebastien Huleux 

Hi,

You can only copy the text within the cell not the cell itself as this
includes more than just the text such as cell formating, formula, etc..

Seb

michael
Germany
Posts: 280
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Re: How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

Post by michael » 08 Dec 2004, 16:05

 Posted by:  Michael Hummel 

Yes, i know this.
I dont want to copy the celltext, because it maybe a formula.
Looking for somithing like SalEditPasteSpecial(PlainText) or a
SalEditPastePlainText() ...

In MS-Office Apps there is a simple way to do that (Edit Insert Contents).

no way ?

michael
Germany
Posts: 280
Joined: 07 Jun 2018, 15:13
Location: Stuttgart, GER

Re: How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

Post by michael » 09 Dec 2004, 10:53

 Posted by:  Michael Hummel 

Thank you,
but this is not what i want.

if the excel cell has a formula, it would be nice to paste the value into a
saltblwindow cell

many programs (ms office, ..) have a "paste" function in menue-> edit ->
paste special -> plain text (in german its "Inhalte einfügen - Nur Text")

so i´m searching for something like SalEditPaste(PLAIN_Text)
SalEditPaste(OBJECT)

Lubos Vnuk

Re: How To Paste the Value of an Excel-Cell into a SalTbl or MTbl Cell

Post by Lubos Vnuk » 11 Jan 2005, 10:29

 Posted by:  Lubos Vnuk 

Hi Michael,

There is also a function bOk = SalEditPasteString ( strString ) that will
give you the text contents of the clipboard. You can check this string to
see if it is what you want. I believe Excel copies a lot of formats into the
clipboard but the text ones (CF_TEXT...) contain the actual value of a cell.
The issue here may be that the value usually ends with CR+LF.

If you want to get to other supported clipboard formats, first you have to
check which those may be e.g. copy a cell in MS Excel, start clipbrd.exe, go
to the View menu and check the list of formats under the last menu
separator. The proper way to enumerate and access those formats would be to
access WinAPI clipboard functions in user32.dll or look for some samples in
Gupta or MS forums.

HTH,
Lubos.

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests