473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

save an excel file (with multiple linked sheets ) as values only

Hi All

I wish to send excel files to other company staff - but save the file as values (so not showing all my formulae links etc )

Please help

Thanks in advance

Kind regards

David H
Nov 13 '08 #1
4 21653
Stewart Ross
2,545 Expert Mod 2GB
Hi. There is no simple in-built facility that allows you to save the contents of a workbook without its underlying formulas. Whilst it is possible to save Excel files in other file formats that save the values but not the formulas (e.g. CSV) this format does not support saving multiple worksheets, and you also lose the cell formatting applied to the worksheet concerned as well.

You could if you wanted to pursue this write VBA code to go through each worksheet using Copy/PasteSpecial/Values to overwrite the contents of each worksheet with values only. Not difficult, but it is destructive (the workbook would have to be based on a reusable template of some kind, as the formulas would disappear from all sheets on running the code).

All seems a fair bit of effort to guard against someone else seeing your formulas. In my experience this is rarely a necessary approach - unless the author of the sheet really has something to hide!!

-Stewart
Nov 13 '08 #2
Select all. Copy the contents of the sheet.
Go to a blank sheet. Select all.

Right click in the upper left, unmarked block between A and 1.
Find paste special in the popup menu.
Look for the "Paste Values" options that work for you, regarding format.
Apr 25 '13 #3
NeoPa
32,556 Expert Mod 16PB
If you put this code in a Standard Module you could call the procedure to do that for all your Worksheets :
Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2.  
  3. Public Sub AllValues()
  4.     Dim wsVar As Worksheet, wsOrg As Worksheet
  5.     Dim ranVar As Range
  6.  
  7.     Set ranVar = Selection
  8.     For Each wsVar In ActiveWorkbook.Worksheets
  9.         Call wsVar.Select
  10.         With Range("A1", ActiveCell.SpecialCells(xlLastCell))
  11.             Call .Copy
  12.             Call .PasteSpecial(xlPasteValues)
  13.         End With
  14.     Next wsVar
  15.     Application.CutCopyMode = False
  16.     With ranVar
  17.         Call .Worksheet.Select
  18.         Call .Select
  19.     End With
  20. End Sub
Apr 25 '13 #4
NeoPa
32,556 Expert Mod 16PB
I moved this question to the Excel forum for you BTW :-)
Apr 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike Knight | last post by:
(I've also posted this problem on microsoft.public.excel.programming) I have a MS Access 2003 Database named "AS400 Fields.mdb". This database contains links to tables on an AS400. In MS...
1
by: javzxp | last post by:
Hi I'd like to use C# to open an existing Excel workbook and save each worksheet it contains into a new Excel file. The name of each new Excel file should be the name of the worksheet copied...
2
by: madeleine | last post by:
I'm hoping the answer to this is that I'm just doing something silly, but I'm really scratching my head over this one. I'm importing data from multiple workbooks, each workbook has a sheet called...
14
by: cj | last post by:
I want to start a workbook and add sheets to it one at a time. Right now my code opens a workbook and it has 3 sheets alread in it and I don't even know how to move from one to another. Any help...
7
by: Vanessa | last post by:
hi Everyone, I have two questions on exporting data to Excel using ASP (w/o converting formatted excel file into web page and then plug in the dynamic data): 1. Can we export data into...
1
by: msanger | last post by:
Hi, I have several excel sheets in Office 2007, which has all kinds of standard calculations, and a consolidated Excel Sheet with totals and rollup of all the other excel files. The issue I am...
0
by: Anish G | last post by:
Hi All, I am getting the below given error while running my application in live server. In my local machine, its working fine. Please help me as it is very urgent for me. Exception from...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.