Exclude cell from being saved

Creating a macro - Writing a Script - Using the API

Exclude cell from being saved

Postby gibsongk55 » Mon May 01, 2017 9:41 am

Hello,

I have a spreadsheet in Calc that is shared between six users. Only problem is that there are two cells with drop down selections that it tries to save and the dialog box comes up with conflicts. Now for my question. Is there anyway I can exclude these two cells selected values from being saved? Appreciate some insight.


Thanks much,

Gibs
OOo 4.1.X on MS Windows 7 UltimateX64
gibsongk55
 
Posts: 28
Joined: Sun Nov 30, 2008 12:44 am

Re: exclude cell from being saved

Postby Zizi64 » Mon May 01, 2017 10:04 am

Only problem is that there are two cells with drop down selections that it tries to save and the dialog box comes up with conflicts.


Are those dropdown selections form control elements or are you using the 'Data validity' function?
(Plese upload an example .ods file here.)
Tibor Kovacs, Hungary; LibreOffice4.4.7 - Portable versions: LO3.3.0-LO5.3.3 and AOO4.1.3; on Win7x64Prof.
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5124
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: exclude cell from being saved

Postby gibsongk55 » Mon May 01, 2017 10:18 am

Hi,

Thanks for the reply. The drop downs are form controls ran in vb. I've uploaded a sample of it.

Thanks,

Gibs
Attachments
Custom autofilter-1.ods
(26.79 KiB) Downloaded 15 times
OOo 4.1.X on MS Windows 7 UltimateX64
gibsongk55
 
Posts: 28
Joined: Sun Nov 30, 2008 12:44 am

Re: exclude cell from being saved

Postby Zizi64 » Mon May 01, 2017 10:50 am

The drop downs are form controls ran in vb


The code is not VB (= Visual Basic); it is StarBasic and some AOO/LO API functions. (API = Application Programming Interface)
(It will not run in M$ Excel)


I can not see any form control dropdown objects in your attached document...
The cells D1, D2 contain 'Data validity' function.
Tibor Kovacs, Hungary; LibreOffice4.4.7 - Portable versions: LO3.3.0-LO5.3.3 and AOO4.1.3; on Win7x64Prof.
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5124
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: exclude cell from being saved

Postby gibsongk55 » Mon May 01, 2017 11:01 am

i didn't write it. Is there any way to do this?
OOo 4.1.X on MS Windows 7 UltimateX64
gibsongk55
 
Posts: 28
Joined: Sun Nov 30, 2008 12:44 am

Re: exclude cell from being saved

Postby Zizi64 » Mon May 01, 2017 11:15 am

I thinkt it: there is not way to save a document partially only...
But you can save a COPY of your document by a macro code and the API function 'StoreAs...()'...or 'StoreTo...()'.

The six users want to open, edit and save the shared document in same time (paralell)?
Tibor Kovacs, Hungary; LibreOffice4.4.7 - Portable versions: LO3.3.0-LO5.3.3 and AOO4.1.3; on Win7x64Prof.
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5124
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: exclude cell from being saved

Postby gibsongk55 » Mon May 01, 2017 11:20 am

The six users work at the same time. It's just that it is a lot of work to maintain separate spreadsheets so I've combined all into one hoping that I could now just maintain one.
OOo 4.1.X on MS Windows 7 UltimateX64
gibsongk55
 
Posts: 28
Joined: Sun Nov 30, 2008 12:44 am

Re: exclude cell from being saved

Postby Zizi64 » Mon May 01, 2017 11:25 am

Sorry, I have not experience with shared documents.
Tibor Kovacs, Hungary; LibreOffice4.4.7 - Portable versions: LO3.3.0-LO5.3.3 and AOO4.1.3; on Win7x64Prof.
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 5124
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: exclude cell from being saved

Postby JeJe » Mon May 01, 2017 12:28 pm

You could write a macro for the document close event to reset those cells to values of your choice. I presume anyway.
Openoffice 4.1.2
Windows 8
JeJe
 
Posts: 104
Joined: Wed Mar 09, 2016 2:40 pm

Re: exclude cell from being saved

Postby gibsongk55 » Mon May 01, 2017 5:14 pm

Make a macro to set both drop downs back to the first choice in the box so no changes are made when saved after the filter is applied? That's a thought. Thanks
OOo 4.1.X on MS Windows 7 UltimateX64
gibsongk55
 
Posts: 28
Joined: Sun Nov 30, 2008 12:44 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 12 guests