FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Windev spreadsheet control not saving comments
Windev spreadsheet control not saving comments
Débuté par Mark Gibbs, 22 avr. 2021 12:06 - 6 réponses
Connectez-vous…
Mark Gibbs
#1
Posté le 22 avril 2021 - 12:06
Hi
I have now added a spreadsheet control to my window.
This allows me to read and write cell values without problem.
I can also read cell comments with no problem.
However, if I change or add a comment associated with a cell that isn't saved with the spreadsheet.
This is my code:
SpreadsheetLoad(PSHEET_ss,"h:\test.xlsx",1,psheetLoadDefault)
sComment is string = PSHEET_ss[1,1].Comment.Text
PSHEET_ss["A2"].Comment.Text = sComment + CR + "test2"
PSHEET_ss[3,1] = 3
SpreadsheetSave(PSHEET_ss,"h:\test2.xlsx",psheetOverwriteAllowed)
SpreadsheetClose(PSHEET_ss)
My pc is running Excel 2019 if that has any relevance (although the documentation says you don't need Excel on the pc at all so I'd think not).
Can anyone help?
Thanks
Mark
Signaler
0
0
Mark Gibbs
#2
Posté le 22 avril 2021 - 13:38
Just a little extra info.
The written comment do show up in the spreadsheet control so the .comment.text = part works.
It's the save that doesn't seem to work - it saves the amended values but not the comments
Mark
Signaler
0
0
Andrea Chiadò Piat
#3
Membre enregistré
54 messages
Popularité : +2 (2 votes)
Posté le 23 avril 2021 - 15:29
Hello Mark,
use this code:
MyComment is xlsComment
MyComment.Text="SomethingYouWant "+DateSys()+TimeSys()
MY_PSHEET[1,1].Comment=MyComment
Hope this helps
Andrea
Signaler
0
0
Mark Gibbs
#4
Posté le 23 avril 2021 - 16:12
Hi Andrea
I tried your suggestion but as before it does amend the comment in the spreadsheet but the SpreadsheetSave function doesn't save the comment to the new spreadsheet but does save any changed cell values.
Seems like a bug in the SpreadsheetSave function.
Thanks
Mark
Signaler
0
0
Andrea Chiadò Piat
#5
Membre enregistré
54 messages
Popularité : +2 (2 votes)
Posté le 27 avril 2021 - 11:43
Hi Mark,
I actually noticed that it behaves strangely with "comments"
What version are you using?
I used V25 for my tests
I didn't tried with V26 yet
Signaler
0
0
Mark Gibbs
#6
Posté le 30 avril 2021 - 13:28
Hi Andrea
I'm using v25
Thanks
Mark
Signaler
0
0
Mark Gibbs
#7
Posté le 03 mai 2021 - 16:29
Hi
PC Soft support have acknowledged that it doesn't behave as it should and are referring rhe issue to thw developers.
Mark
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