Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 mohamedafzal
		
			mohamedafzal
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have a chart with export option. Export can also be done when Right click and select Export or Send to Excel.
When exported, the excel name by default has a junk name. (Say Egs- 76210519debc4f61b6b7426c145d453c.xls)
Can we add predefined name or Chart Name to the Excel when exported. (Egs- Sales Value by Country)
 
					
				
		
 Chip_Matejowsky
		
			Chip_Matejowsky
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Mohamed,
From my experience, this is working as designed. To rename the XLS file, you have two options:
1. In the right-click menu, click Export. Select a file type .XLS and you can name it whatever you wish.
2. You can create a button with underlying macro to Export and use a file type of Excel (BIFF format). See the attached sample .QVW.
Hope this helps
- Chip
 sacosta5
		
			sacosta5
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello...
Without macro I don't think this is possible.
See this posts:
 
					
				
		
 el_aprendiz111
		
			el_aprendiz111
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Sub DeleteFiles
 Set filesys = CreateObject("Scripting.FileSystemObject")
 If filesys.FileExists("C:\tmp.xlsx") then
 filesys.DeleteFile "C:\tmp.xlsx"
 Msgbox("Files Deleted")
 Else
 Msgbox("No Files to delete")
 End If
 End Sub
 
 
 sub Export_Excel
 set oXL=CreateObject("Excel.Application")
 
 oXL.Workbooks.Add
 oXL.visible=True
 aSheetObj=Array("CH08","CH09")
 for i=0 to UBound(aSheetObj)
 oXL.Sheets.Add  
 Set oSH = oXL.ActiveSheet
 oSH.Range("A1").Select   
 Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))
 obj.CopyTableToClipboard True
 oSH.Paste
 sCaption=obj.GetCaption.Name.v
 set obj=Nothing 
 
 oSH.Name=left(sCaption,30)    
 oSH.Rows("1:1").Select
 oXL.Selection.Font.Bold = True      
 oSH.Cells.Select
 oXL.Selection.Columns.AutoFit
 oSH.Range("A1").Select    
 
 next
 call DeleteFiles 
 oSH.SaveAs "C:\tmp.xlsx",51
 
 set oSH=Nothing
 set oXL=Nothing
 end sub 
 mohamedafzal
		
			mohamedafzal
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Helo Chip
Thanks for your response.
Option 1 is based on Browser settings. If the Downloads is made to save in the location file, it will prompt the user before saving the excel.
In most cases for the user, the default browser settings, the download happen automatically and it get saved in the Downloads folder. In such cases, we can't give the name of the file.
Option 2 we tried. Macros is not working for AJAX. Hence anything on Macros is not working on server.
 saimahasan
		
			saimahasan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Afzal,
To execute macro on AJAX u will need IE Plugin. Install IE Plugin and then try running macros on AJAX. It should work
 mohamedafzal
		
			mohamedafzal
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks Saima.
The report should be viewed in all browsers. (IE, Firefox, Crome, Safari)
Can different plugins be installed based on browsers?
