Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update a value in excel sheet during runtime & use the value later in the same script
#1
Not Solved
I am importing an excel sheet during runtime and updating a filed value and saving the excel sheet.Later in the same script, I am importing teh same sheet and using the updated value.

The issue is the excel sheet does nat have the upadted value during runtime(it is taking the earlier value already present). but when checked Opening the extenal sheet, it has the upadted value.

How to get the upadated value during runtime.

Please help on this.
Reply
#2
Not Solved
Hello,

Please share your code.

Regards,
Parminder
Reply
#3
Not Solved
Hi,

if possible can u share the code, so that i will check and update u
Reply
#4
Not Solved
SUGGESTION
-------------------------------------------------------------
see, there may be two purpose of wat exactly u r trying to do....
1. just have to use the updated value later, dats y u r storing it...this is only for runtime use purpose...
2. Or u have to store d update value and have to save it in Excell dat u can see it after that run session too..may be this is d reason y u r storing it...

Now if ur requirement is d first one, then u can use store d update value in an Environment variable on runtime. If u do so, u can also be able to use dat updated value later on d same run session....


But if ur requirement is d 2nd one, then i will suggest::--- take d update value, store it in an environment variable and also write it in excel. whenever u need to use dat update value later, use d environment variable instead of importing d same excel again...
-----------------------------------------------------------------

SOLUTION

Now i'm coming to ur solution wat u have faced....as u hav mentioned, its clear dat u r importing same excel twice in a same run session...bt 2nd time u r not getting d updated value instead of saving it on 1st time...It may happen if u dnt release d excell from ur Local/Global sheet before 2nd time importing....1st u import-->Write on it-->Save it-->Release the excel by importing some other excel on Global/Local sheet-->then import d earlier excel again for 2nd time....If u do this, i think u'll cover-up ur problem.....Let me know d result....

------------------
Thanx.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is VBScripting disabled in Office 365 update? soumyarani 0 1,246 12-19-2020, 12:37 PM
Last Post: soumyarani
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,583 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  Excel and Driver Script shipu 1 3,576 02-27-2014, 09:09 AM
Last Post: supputuri
  Custom sort -Excel Sheet kiran 1 3,676 01-28-2014, 09:23 AM
Last Post: supputuri
  Can we save an exported Excel sheet directly from QTP? Akhila 2 3,123 11-28-2013, 10:30 AM
Last Post: Akhila

Forum Jump:


Users browsing this thread: 1 Guest(s)