The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 100 errorHandler->error
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 1250 errorHandler->error
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 546 - File: inc/class_parser.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_parser.php 546 errorHandler->error
/inc/class_parser.php 580 postParser->cache_smilies
/inc/class_parser.php 195 postParser->parse_smilies
/inc/plugins/bam.php 329 postParser->parse_message
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined variable $announcements - Line: 2 - File: inc/plugins/bam.php(356) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/bam.php(356) : eval()'d code 2 errorHandler->error
/inc/plugins/bam.php 356 eval
/inc/class_plugins.php 142 bam_announcements
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 201 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 201 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "gomobile" - Line: 214 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 214 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "gomobile" - Line: 275 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 275 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 280 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 280 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcetheme
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "fid" - Line: 2275 - File: inc/plugins/mysupport.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/mysupport.php 2275 errorHandler->error
/inc/class_plugins.php 142 mysupport_notices
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "fid" - Line: 2277 - File: inc/plugins/mysupport.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/mysupport.php 2277 errorHandler->error
/inc/class_plugins.php 142 mysupport_notices
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 749 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 749 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.2.18 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $metadescription - Line: 2 - File: global.php(953) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(953) : eval()'d code 2 errorHandler->error
/global.php 953 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $metakeywords - Line: 3 - File: global.php(953) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(953) : eval()'d code 3 errorHandler->error
/global.php 953 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $unreadreports - Line: 54 - File: global.php(956) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(956) : eval()'d code 54 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 56 - File: global.php(956) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/global.php(956) : eval()'d code 56 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 298 - File: inc/plugins/gomobile.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/gomobile.php 298 errorHandler->error
/inc/class_plugins.php 142 gomobile_forcefooter
/global.php 1250 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key 3487 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 6093 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 7786 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5978 google_seo_url_profile
/inc/functions.php 6046 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 7976 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.2.18 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5978 google_seo_url_profile
/inc/functions.php 6046 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.2.18 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Micro Focus QTP (UFT) Forums
Write Heading in excel - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Write Heading in excel (/Thread-Write-Heading-in-excel)

Pages: 1 2 3


RE: Write Heading in excel - Anu - 07-27-2010

Hi,

I used array for Header but while writing it into the excel the code given by you is :
*** Writing Header***'
Code:
sHeaderList = Split(sHeader,",")
    i = 0
    For Each sHeader in sHeaderList
        i = i + 1
        ExcelSheet.ActiveSheet.Cells(1, i).Value = sHeader
    Next

As i declared header as array then what changes should i do in the above code as i am getting confuse between sHeader & sHeaderList.
Please explain me so that i can proceed further.
Thanks in advance...................

Regards,
Anu


RE: Write Heading in excel - sasmitakumari - 07-27-2010

Since in my example I have kept all headers in a single string with comma separated , I had used Split function to get individual header. Now you should omit that line...
Ex: If your array name is "sHeaderArray" then...
*** Writing Header***'
Code:
i = 0
For Each sHeader in sHeaderArray
i = i + 1
ExcelSheet.ActiveSheet.Cells(1, i).Value = sHeader
Next



RE: Write Heading in excel - Anu - 07-27-2010

Hi,

I have done the modifications as per your reply. But not able to write in excel
However for writing in excel code is little bit different from yours code......
Code:
'For Wirting in Excel Sheet’
Dim xlApp, xlBook, xlSheet ,sHeaderArray()
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.WorkBooks.Open("F:\Test.xls")
Set xlSheet = xlBook.WorkSheets("Sheet1")
'*** Writing Header***'
      i = 0
    For Each sHeader in sHeaderArray
        i = i + 1
        ExcelSheet.ActiveSheet.Cells(1, i).Value = sHeader
    Next
' Save the sheet.
xlBook.Save
' Close Excel with the Quit method on the Application object.
xlApp.DisplayAlerts = False
xlApp.Quit
' Release the object variable.
Set ExcelSheet = Nothing
Set objExcel = Nothing

I am using the above code. Could ypu please tell me why is it not writting the header to excel.
Waiting for reply..........

Regads,
Anu


RE: Write Heading in excel - sasmitakumari - 07-27-2010

Are you getting values and storing it in sHeaderArray before you running this logic? And after running above code, are you getting any run time error? If not, is the "F:\Test.xls" exists after you run?


RE: Write Heading in excel - Anu - 07-27-2010

Hi,

I did not get you.................Sad


RE: Write Heading in excel - sasmitakumari - 07-27-2010

you said "why is it not writting the header to excel.?", to make it more clear... You are using one array to keep your headings , right?
so before you write to excel sheet, I just wanted to confirm if your array contains any value?
like sHeaderArray(0) = "test", etc...


RE: Write Heading in excel - Anu - 07-27-2010

No, it did not contain any value.
I declare it as Dim sHeaderArray()
Please correct me if i declare it in a worng way.
Waiting for early reply...........

Regards,
Anu


RE: Write Heading in excel - sasmitakumari - 07-27-2010

Are you able to get the search result headings using QTP? If so, can you provide your code that you are using to get the search result headings?


RE: Write Heading in excel - Anu - 07-27-2010

i did not understand but i am pasting the code which i am using :
CODE:---------------------------------------
Code:
SystemUtil.Run "F:\Program Files\Internet Explorer\iexplore.exe","","F:\Documents and Settings\Anu","open"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "http://google.com/"
Browser("Browser").Page("Google").WebEdit("q").Set "header"
Browser("Browser").Page("Google").WebEdit("q").Submit
'For Wirting in Excel Sheet’
Dim xlApp, xlBook, xlSheet ,sHeaderArray()
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.WorkBooks.Open("F:\Test.xls")
Set xlSheet = xlBook.WorkSheets("Sheet1")
'*** Writing Header***'
      i = 0
    For Each sHeader in sHeaderArray
        i = i + 1
        ExcelSheet.ActiveSheet.Cells(1, i).Value = sHeader
    Next
' Save the sheet.
xlBook.Save
' Close Excel with the Quit method on the Application object.
xlApp.DisplayAlerts = False
xlApp.Quit
' Release the object variable.
Set ExcelSheet = Nothing
Set objExcel = Nothing



RE: Write Heading in excel - sasmitakumari - 07-27-2010

ok, after submit, use GetROProperty method to get the search result headings, if the properties of the page are not uniquely identified use descriptive programing. and keep them in a array. See the example, do not take as it is , try urself and apply your logic.
Ex:
Code:
Dim sHeaderArray(100)
For i = 0 to n 'specify your limit for value of n
sHeaderArray(i) =  Browser("Browser").Page("Google").Link().GetROProperty("text")
Next
After you have value in your array, use the logic to write the header in your excel.