FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
[WD20] .Net Control (Gembox)
[WD20] .Net Control (Gembox)
Débuté par David Egan, 30 aoû. 2015 22:08 - 8 réponses
Connectez-vous…
David Egan
#1
Posté le 30 août 2015 - 22:08
Hi
I'm trying to add the Gembox spreadsheet to a window.
I added the .Net control and added the DLLs to the project. In the parameters Windev requires 2 items, the assembly name & the Winform class & that is where I come unstuck! All the documentation for the object simply suggests the assembly is all that is required but Windev won't allow that.
No matter what I assign as the Winform I get 2 errors displayed in the control when I try to run it; "Unable to build object" and "Unable to invoke <.ctor()> method of type. (The part varies depending on the Winform class selected). From testing I am certain these errors are propagated when the control is initilaised and before any license checking is done.
It's probably something very simple I've missed (first attempt at .Net control on a window).
Thanks
David
Signaler
0
0
Al
#2
Posté le 31 août 2015 - 23:36
Hello David
I haven't used the Excel Gembox but The Word one works peferctly so I imagine that the setup would bethe same so have you copied the Gembox dll into the Windows assembly folder ?
Mario at Gembox is really helpful so an email to him may also be useful to try.
Regards
Al
Signaler
0
0
David Egan
#3
Posté le 01 septembre 2015 - 06:08
Hi Al
Thanks,the dll is there. I just tried the WP one & I have the same problem with it. I'm sure it's something I'm missing. What control type did you use, .Net or XAML?
With .Net it asks for the assembly (Gembox.Document.dll) & the .Net 2.0 class (Winform). What have you used for that?
If you've used XAML what code have you used to start it up?
Thanks
David
Signaler
0
0
Al
#4
Posté le 01 septembre 2015 - 11:53
Hello David
I bring the dll into my project using the .NetAssemblies option in the Windev Project Explorer pane. I just right click on it and select the Gembox dll from the list of assemblies. It doesn't ask me for any other .Net assembly
On the client side I had to add the wd190net2.dll and wd190net4.dll to existing installations
On my PC I have version .Net v4.0.30319 so maybe you need to be running a later verison of .Net ?
I hope this helps
Regards
Al
Signaler
0
0
David Egan
#5
Posté le 02 septembre 2015 - 00:44
Hi Al
Tried loading it that way & I'm getting a little bit further (no errors) but I still don't get anything displayed to the screen. What control type did you place on the window?
Cheers
David
Signaler
0
0
Al
#6
Posté le 02 septembre 2015 - 04:38
Hello David
Sorry David I just use the document version, so there is no control onscreen just code to handle the documents.
Regards
Al
Signaler
0
0
David Egan
#7
Posté le 03 septembre 2015 - 00:56
Aah well, that explains that!
Thanks anyway
David
Signaler
0
0
MichaelG
#8
Posté le 04 septembre 2015 - 16:49
My first question would be whether the end user will have excel installed on their machine or not.
Signaler
0
0
MichaelG
#9
Posté le 04 septembre 2015 - 18:33
Bear in mind I've only used WinDev for a couple of months and am not familiar with GemBox. That being said it appears that GemBox doesn't have a good way to view files unless the box has Excel installed. To accomplish what you want you need to set your .Net 2.0 control CLASS to point to:
System.Windows.Forms.DataGridView
It will autofill the .dll (System.Windows.Forms.dll)
From there I added a button and in its click event I added:
ef is "GemBox.Spreadsheet.ExcelFile" xlsLO is XlsxOptions dgvOpt is ExportToDataGridViewOptions dgvOpt:set_ColumnHeaders(True) ssPath is UNICODE string ssPath = "C:\Users\mwgreen\Desktop\WinFormsUtilitiesSample.xlsx" ef:LoadXlsx(ssPath,xlsLO) DataGridViewConverter.ExportToDataGridView(ef.Worksheets.ActiveWorksheet, excelshow, dgvOpt)
my sources were:
MSDN
GemBox Examples
and the compiled help provided with the software. I hope this helps you.
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte