Dim NumberOfRows As Integer
Dim X As Object
Counter = 2
'Calculate các số này của dữ liệu.
NumberOfRows = UBound (ActiveChart.SeriesCollection (1) .Values)
Worksheets ("ChartData"). Cells (1, 1) = "X Values"
'Write x-axis values to worksheet.
With Worksheets ("ChartData")
.Range (.Cells (2, 1), _
.Cells (NumberOfRows + 1, 1)) = _
Application.Transpose (ActiveChart.SeriesCollection (1) .XValues)
End With
'Loop through các các dòng trong các mục đã ghi rõ và ghi sang
'the worksheet.
For Each X In ActiveChart.SeriesCollection
Worksheets ("ChartData"). Cells (1, Counter) = X.Name
With Worksheets ("ChartData")
.Range (.Cells (2, Counter), _
.Cells (NumberOfRows + 1, Counter)) = _
Application.Transpose (X.Values)
End With
Counter = Counter + 1
next
End Sub
To insert or delete a worksheet in a workbook, right-click the worksheet, then rename it to ChartData . Select the chart to extract the basic data values. Note: The chart can be embedded in a worksheet or on a separate chart> run macro> Data from the chart is placed on the ChartData spreadsheet.
With a workbook backup, you will always have access to your data if your workbook is accidentally deleted or corrupted.
1. Click File> Save As .
2. Click Computer , and then click the Browse button.
3. In the Save As dialog box, click the arrow next to Tools , and then click General Options .
4. In the General Options dialog box, select Always create backup .
A recovery file of the worksheet also helps ensure you will have access to your data if your workbook is accidentally deleted or corrupted.
1. Click File> Options .
2. In the Save section, in Save workbooks , select Save AutoRecover information every box , then enter the minutes. (Default is 10).
3. In the AutoRecover file location box, enter the location where you want to save the recovery file.
4. Make sure Disable AutoRecover for this workbook is not selected.
If Excel cannot open the spreadsheet file, or even the Open And Repair option is a problem, reset the calculation mode to manual processing and try again. Steps to take:
Now open the corrupted file again. Maybe Excel will 'catch error' and open the problem file.
If Excel cannot open the corrupted workbook, take the opportunity for Microsoft Office Tools. Usage is as follows:
This recovery tool will turn off Excel and then reboot, displaying a list of restored spreadsheet files. If you're lucky, your precious Excel file will be on this list. Just open and continue using!
Sometimes a spreadsheet file fails, not because of software reasons or users' mistakes. Most likely it is temporarily unavailable, network systems and servers often still mark them as corrupted files. In the event of a known error with similar causes and Excel cannot be fixed, please transfer the file to another folder, drive or server.
Download the OpenOffice software
Some people claim to feel completely surprised with the satisfactory results when using the OpenOffice application suite to repair Excel error files. This is a famous free open source tool. If you cannot handle the spreadsheet file with errors on Excel, use OpenOffice Calc . Of course, this is often more complex and complicated than you think.
If you cannot fix the corrupted spreadsheet file, try opening it in WordPad. If successful, WordPad will convert everything to text. Of course, this does not necessarily make you completely happy beyond the joy of being able to retrieve data. This option will not be able to recover font and table formats . However, unlike some other data recovery options, WordPad will help you recover macros. Use the search command Sub and Function on the recovered data block to find them.
You can also open a corrupted .xls file on Word, but the results are usually quite limited. With this option, you must install the Microsoft Office Excel converter. Unlike WordPad, Word does not recover macros.
Sometimes you can recover data by processing the cells on the corrupted file. You will not be able to retrieve formatting, charts, macros . but recovering data is already too lucky. The process is as follows:
Switching to another format is an effective solution when Excel fails
Microsoft recommends using the SYLK format to avoid errors when using Excel, especially printer-related errors. You can open the corrupted Excel file in this way:
After you've saved all the new sheets, open the .slk file and edit it to .xls. Be careful, don't use the name of the failed workbook file. If successful, you can save the values from the entered formula but the formulas do not.
If you can restore the data but still bundle the macros, you can save them in the following way:
Good luck!
See more: