Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default converting an excel spreadsheet into a jpg ...need help

Any one know how to convert an excel spreadsheet into a jpg which in turn
will be uploaded on a webpage.
Using MS office 2003
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 123
Default converting an excel spreadsheet into a jpg ...need help

Hi,

This is something i found over the web.

paster the entire code on to the editor.

Thanks!

Option Explicit
'Harold Staff -- see http://www.mvps.org/dmcritchie/excel/xl2gif.htm
'XL2GIF_module -- GIF_Snapshot
Dim container As Chart
Dim containerbok As Workbook
Dim Obnavn As String
Dim Sourcebok As Workbook

Function SelectArea() As String
Dim Internrange As Range
On Error GoTo Brutt
Set Internrange = Application.InputBox("Select " _
& "range to be photographed:", "Picture Selection", _
Selection.AddressLocal, Type:=8)
SelectArea = Internrange.Address
Exit Function
Brutt:
SelectArea = "A1"
End Function

Function sShortname(ByVal Orrginal As String) As String
Dim iii As Long
sShortname = ""
For iii = 1 To Len(Orrginal)
If Mid(Orrginal, iii, 1) < " " Then _
sShortname = sShortname & Mid(Orrginal, iii, 1)
Next
End Function

Private Sub ImageContainer_init()
Workbooks.Add (1)
ActiveSheet.Name = "GIFcontainer"
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Worksheets(1).Range("A1")
ActiveChart.Location Whe=xlLocationAsObject, _
Name:="GIFcontainer"
ActiveChart.ChartArea.ClearContents
Set containerbok = ActiveWorkbook
Set container = ActiveChart
End Sub

Sub MakeAndSizeChart(ih As Long, iv As Long)
Dim Hincrease As Single
Dim Vincrease As Single
Obnavn = Mid(ActiveChart.Name, Len(ActiveSheet.Name) + 1)
Hincrease = ih / ActiveChart.ChartArea.Height
ActiveSheet.Shapes(Obnavn).ScaleHeight Hincrease, _
msoFalse, msoScaleFromTopLeft
Vincrease = iv / ActiveChart.ChartArea.Width
ActiveSheet.Shapes(Obnavn).ScaleWidth Vincrease, _
msoFalse, msoScaleFromTopLeft
End Sub

Public Sub GIF_Snapshot()
Dim varReturn As Variant
Dim MyAddress As String
Dim SaveName As Variant
Dim MySuggest As String
Dim Hi As Long
Dim Wi As Long
Dim Suffiks As Long

Set Sourcebok = ActiveWorkbook
MySuggest = sShortname(ActiveSheet.Name)
ImageContainer_init
Sourcebok.Activate
MyAddress = SelectArea
If MyAddress < "A1" Then
SaveName = Application.GetSaveAsFilename( _
InitialFileName:=MySuggest _
& ".gif", fileFilter:="Gif Files (*.gif), *.gif")
Range(MyAddress).Select
Selection.CopyPicture Appearance:=xlScreen, _
Format:=xlBitmap
If SaveName = False Then
GoTo Avbryt
End If
If InStr(SaveName, ".") Then SaveName _
= Left(SaveName, InStr(SaveName, ".") - 1)
Selection.CopyPicture Appearance:=xlScreen, _
Format:=xlBitmap
Hi = Selection.Height + 4 'adjustment for gridlines
Wi = Selection.Width + 6 'adjustment for gridlines
containerbok.Activate
ActiveSheet.ChartObjects(1).Activate
MakeAndSizeChart ih:=Hi, iv:=Wi
ActiveChart.Paste
ActiveChart.Export Filename:=LCase(SaveName) & _
".gif", FilterName:="GIF"
ActiveChart.Pictures(1).Delete
Sourcebok.Activate
End If
Avbryt:
On Error Resume Next
Application.StatusBar = False
containerbok.Saved = True
containerbok.Close
End Sub


Thanks!
Boss

"Nana6" wrote:

Any one know how to convert an excel spreadsheet into a jpg which in turn
will be uploaded on a webpage.
Using MS office 2003
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 104
Default converting an excel spreadsheet into a jpg ...need help

Copy into Powerpoint and save page as JPG or do yourself a favor and get a
screenshot utility. Some of them are freeware (e.g. Gadwin PrintScreen, the
"not Professional" version is free http://www.gadwin.com/download/)


"Nana6" wrote in message
...
Any one know how to convert an excel spreadsheet into a jpg which in turn
will be uploaded on a webpage.
Using MS office 2003
Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default converting an excel spreadsheet into a jpg ...need help

hi.
do a print screen. paste in paint or similar. save as .jpg.

Regards
FSt1

"Nana6" wrote:

Any one know how to convert an excel spreadsheet into a jpg which in turn
will be uploaded on a webpage.
Using MS office 2003
Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default converting an excel spreadsheet into a jpg ...need help


In XL,select the range you want to make a picture of
While pressing the *shift *button select the *Edit* menu
Select " *copy picture*"
(sort of hidden feature of XL)
From there on you can save it as jpg with paint or a similar progam


--
Pecoflyer

Cheers -
*_Membership_is_free_* & allows file upload -faster and better answers
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46896



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 293
Default converting an excel spreadsheet into a jpg ...need help

I found this Very Helpful as it also applies to Vista

Best

Stewart

"Pecoflyer" wrote:


In XL,select the range you want to make a picture of
While pressing the *shift *button select the *Edit* menu
Select " *copy picture*"
(sort of hidden feature of XL)
From there on you can save it as jpg with paint or a similar progam


--
Pecoflyer

Cheers -
*_Membership_is_free_* & allows file upload -faster and better answers
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46896


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default converting an excel spreadsheet into a jpg ...need help

Thanks everyone! I have learned some new tricks here!
Thanks for telling me about the freeware and also using the shift key with
the edit.Appreciate your quick replies!!! thanks again!

"Nana6" wrote:

Any one know how to convert an excel spreadsheet into a jpg which in turn
will be uploaded on a webpage.
Using MS office 2003
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a 2007 Excel Spreadsheet w/ 2003 Greg Excel Discussion (Misc queries) 2 October 7th 08 10:59 PM
Converting a PDF file to an EXCEL Spreadsheet jmcclain Excel Discussion (Misc queries) 0 February 9th 07 10:57 PM
Converting Excel spreadsheet with formulae to Access database AndyL82 Excel Discussion (Misc queries) 1 February 3rd 07 06:53 PM
Converting labels from Word to an Excel spreadsheet Leah Stein New Users to Excel 3 December 20th 06 03:44 AM
Converting Lotus Spreadsheet to Excel becky Excel Discussion (Misc queries) 0 February 4th 05 02:37 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"