Skip to main content

Conas gach bileog oibre a shábháil mar luachanna amháin?

Má tá leabhar oibre agat ina bhfuil iliomad foirmlí, anois, ní mór duit an comhad seo a dháileadh ar úsáideoirí eile, níl tú ag iarraidh na foirmlí a thaispeáint ach luachanna a thaispeáint. De ghnáth, is féidir linn bileog oibre a shábháil go tapa mar luachanna trí na sonraí a chóipeáil agus a ghreamú mar luachanna amháin. Ach, conas a d’fhéadfá gach bileog oibre a shábháil mar luachanna ach gan iad a chóipeáil agus a ghreamú ceann ar cheann?

Sábháil gach bileog oibre mar luachanna le cód VBA amháin


mboilgeog cheart gorm saighead Sábháil gach bileog oibre mar luachanna le cód VBA amháin

Is féidir leis an gcód VBA seo a leanas cabhrú leat gach bileog a shábháil go tapa mar luachanna (gan aon fhoirmlí) agus gach formáidiú cille a chaomhnú. Déan mar seo le do thoil:

1. Coinnigh síos an ALT + F11 eochracha a oscailt Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. Cliceáil Ionsáigh > Modúil, agus greamaigh an cód seo a leanas sa Modúil Fuinneog.

Cód VBA: Sábháil gach bileog oibre mar luachanna amháin:

Sub Saveasvalue()
'Updateby Extendoffice
    Dim wsh As Worksheet
    For Each wsh In ThisWorkbook.Worksheets
        wsh.Cells.Copy
        wsh.Cells.PasteSpecial xlPasteValues
    Next
    Application.CutCopyMode = False
End Sub

3. Ansin brúigh F5 eochair chun an cód seo a rith, agus sábháladh an leabhar oibre iomlán mar luachanna amháin, baineadh na foirmlí uile ag an am céanna ach luachanna a fhágáil le formáidiú cille.

nótaí: Sula gcuirfidh tú an cód i bhfeidhm, is féidir leat cóip den leabhar oibre a shábháil ar dtús.

Uirlisí Táirgiúlachta Oifige is Fearr

🤖 Kutools AI Aide: anailís sonraí a réabhlóidiú bunaithe ar: Forghníomhú Chliste   |  Gin Cód  |  Cruthaigh Foirmlí Saincheaptha  |  Anailís a dhéanamh ar Sonraí agus Cairteacha a Ghin  |  Feidhmeanna Kutools a agairt...
Gnéithe Coitianta: Faigh, Aibhsigh nó Aithnigh Dúblaigh   |  Scrios Sraitheanna Bána   |  Comhcheangail Colúin nó Cealla gan Sonraí a Chailleadh   |   Babhta gan Foirmle ...
Cuardaigh Super: Ilchritéir VLookup    VLookup Illuachanna  |   VLookup Trasna Ilbhileoga   |   Amharc doiléir ....
Liosta anuas Casta: Go tapa Cruthaigh Liosta Anuas   |  Liosta anuas Cleithiúnach   |  Liosta Buail Isteach Ilroghnacha ....
Bainisteoir Colún: Cuir Líon Sonrach Colún leis  |  Colúin Bog  |  Scoránaigh Stádas Infheictheachta na gColún Ceilte  |  Déan comparáid idir Raonta & Colúin ...
Gnéithe Réadmhaoin: Fócas Eangaí   |  Amharc Dearaidh   |   Barra Mór na Foirmle    Leabhar Oibre & Bainisteoir Bileog   |  Leabharlann Acmhainní (Uaththéacs)   |  Piocálaí Dáta   |  Comhcheangail Bileoga Oibre   |  Criptigh/Díchriptigh Cealla    Seol Ríomhphost trí Liosta   |  Scagaire Super   |   Scagaire Speisialta (scagaire trom/iodálach/stailc tríd...) ...
Barr 15 Uirlisí12 Téacs uirlisí (Cuir Téacs, Bain Carachtair,...)   |   50 + Cairt cineálacha (Cairt Gantt,...)   |   40+ Praiticiúil Foirmlí (Ríomh aois bunaithe ar lá breithe,...)   |   19 Insertion uirlisí (Cuir isteach Cód QR, Ionsáigh Pictiúr ón gCosán,...)   |   12 Tiontú uirlisí (Uimhreacha le Focail, Comhshó Airgeadra,...)   |   7 Cumaisc & Scoilt uirlisí (Sraitheanna Comhcheangail Casta, Cealla Scoilt,...)   |   ... agus eile

Supercharge Do Scileanna Excel le Kutools le haghaidh Excel, agus Éifeachtúlacht Taithí Cosúil Ná Roimhe. Kutools le haghaidh Excel Tairiscintí Níos mó ná 300 Ardghnéithe chun Táirgiúlacht a Treisiú agus Sábháil Am.  Cliceáil anseo chun an ghné is mó a theastaíonn uait a fháil ...

Tuairisc


Tugann Tab Oifige comhéadan Tabbed chuig Office, agus Déan Do Obair i bhfad Níos Éasca

  • Cumasaigh eagarthóireacht agus léamh tabbed i Word, Excel, PowerPoint, Foilsitheoir, Rochtain, Visio agus Tionscadal.
  • Oscail agus cruthaigh cáipéisí iolracha i gcluaisíní nua den fhuinneog chéanna, seachas i bhfuinneoga nua.
  • Méadaíonn do tháirgiúlacht 50%, agus laghdaíonn sé na céadta cad a tharlaíonn nuair luch duit gach lá!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks for help
This comment was minimized by the moderator on the site
sämst shjkjhgasghjdfsjhkfdgsdjhgafgb,ja u fdsvjkhgfkjahfg ka khdfzhjkg
This comment was minimized by the moderator on the site
Hi,
This is what i'm using (I exit the file automatically so I won't save accidently with values only).

But I wanted to keep just one sheet saved "normally" because I have a drop down list there that I would not like to lose when sharing the file.


Can anyone help me do this?

Thank you!


<div data-tag="code">Sub Saveasvalue()

Dim wsh As Worksheet
For Each wsh In ThisWorkbook.Worksheets
wsh.Cells.Copy
wsh.Cells.PasteSpecial xlPasteValues
Next
Application.CutCopyMode = False

savename = Application.GetSaveAsFilename(fileFilter:="Exel Files (*.xlsx), *.xlsx")
ActiveWorkbook.SaveAs Filename:=savename, FileFormat:=51

Application.DisplayAlerts = False 'exit without alerts
Application.Quit
End Sub
This comment was minimized by the moderator on the site
It runs good but i need a VBA of paste as value for a bunch of excels workbooks.



This comment was minimized by the moderator on the site
Is there any way to undo this if you've forgotten to save down the formula version first?
This comment was minimized by the moderator on the site
I need to publish Excel based financial statements with groupings. This worked to clear all the formulae and leave just the numbers. Other methods I tried cleared the groupings.
This comment was minimized by the moderator on the site
Good! Excellent! I need this but no any sheets
This comment was minimized by the moderator on the site
Remove all filters/protection in all the sheets. should work perfectly.
This comment was minimized by the moderator on the site
Tengo ese código, si bien es cierto funciona pero quisiera que no considere algunas hojas de mi archivo excel. se puede ?
Saludos.
This comment was minimized by the moderator on the site
Funcionou!! Muito Bom!!!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations