Home > Software engineering >  Vb how to open the need of repair. XLSX form
Vb how to open the need of repair. XLSX form

Time:11-10



Vb to download from the web XLSX file, Set xlbook=xlapp. Workbooks. Open (s) to Open The Times wrong, manually Open XLSX found file is in need of repair,
Again after repair save execution can smoothly open with the code, please everyone a great god, and how to use vb code to avoid this problem, how can I open this needs to be fixed XLSX file directly,
Have to try the following method is invalid,
Application. DisplayAlerts=True/false

The following is a code
Private Sub Command16_Click ()
Call jianCha_s (" D: \ Users \ dell \ accessories \ \ Desktop \ on-demand audit 2-180625-005-00962. The XLSX ")
End Sub
Private Function jianCha_s As String (s)
Dim I As an Integer, As Integer x, y As an Integer, j As an Integer, As an Integer k, z As an Integer, zz As Integer
Dim ireco As an Integer, STRSQL As String
Dim sy () As String

If Reco. State & lt;> AdStateClosed Then
Reco. Close
The Set Reco=Nothing
End the If
STRSQL="select * from illegal_s"
Reco. Open (STRSQL), Conn, 3, 3
Ireco=Reco. RecordCount

Reco. MoveFirst
ReDim sy (ireco - 1)
For x=0 To ireco - 1
Sy (x)=Reco. Fields (1)
Reco. MoveNext
Next
Reco. Close
The Set Reco=Nothing
Application. DisplayAlerts=True
The Set xlapp=CreateObject (" excel. Application ")
Xlapp. Visible=True


The Set xlbook=xlapp. Workbooks. Open (s)
I=xlapp. Worksheets. Count
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
Xlbook. Close
Xlapp. Quit
The Set xlbook=Nothing
The Set xlapp=Nothing

Application. DisplayAlerts=True
End Function

CodePudding user response:

You try the "record", again from its code can find out what clue no,


Workbooks. The Open () function has a lot of parameters, may be related to a particular parameter values (just a guess, this completely sure ).

CodePudding user response:

problem in the process of open XLSX record macro

CodePudding user response:

Open the process can also be "recorded" down,
Open the Excel, (the "default blank document") open the "record", and then through the tool button to open the document,
Appeared above the tip in 1 picture, point "yes", then stop the recording,
Recorded this time you can see just open the file process code,
Is there a "valuable" information, of course, it's not clear,

CodePudding user response:

Sub macro (2)
'
"Acer 2
'

'
Workbooks. Open Filename:=_
"D: \ Users \ dell \ accessories \ \ Desktop \ on-demand audit 2-180625-005-00962. The XLSX"
End Sub


The bad news, there is no valuable information

CodePudding user response:

reference 4 floor weixin_42624883 response:
Sub macro 2 ()
'
"Acer 2
'

'
Workbooks. Open Filename:=_
"D: \ Users \ dell \ accessories \ \ Desktop \ on-demand audit 2-180625-005-00962. The XLSX"
End Sub


The bad news, there is no valuable information



That may not be able to,
Only hope, is to check the data, look at its Open () function is a pile of parameters, can have the result of "control",

Don't know you this document, could you send come, let us give it a try?
To the network location, send a Shared links (can directly download the sort of, such as baidu network backup, don't need to login to download a network location)
If there is is not convenient to disclose the contents of the "" forget it then,

CodePudding user response:

Manual can't open the file using VB6 code to open estimates it will say [can't]

CodePudding user response:

Link: https://pan.baidu.com/s/1Wf2JKmxjWQAdFvc0wJs2FQ password: ru8c

CodePudding user response:

What if you know the repair process, can be simulated by program,

For instance, with the binary editor opens with exercises need to repair the files and documents after repair, analysis was carried out which repair actions,

, of course, if you can find the technical information about XLSX file repair, it would be easier to some,

CodePudding user response:

The
reference 7 floor weixin_42624883 response:
link: https://pan.baidu.com/s/1Wf2JKmxjWQAdFvc0wJs2FQ password: ru8c

I try to download this several parameters: IgnoreReadOnlyRecommended, Notify, Converter, UpdateLinks
No effect,

The rest of the several parameters, the feeling is more "irrelevant", don't try,

CodePudding user response:

True feeling, can use python open, and can only change the way of thinking

CodePudding user response:

Python can be read directly support XLSX document data?

CodePudding user response:

Can read and write, will do,

CodePudding user response:

The
refer to 12 floor weixin_42624883 reply:
can ah, reading and writing is ok,

Then maybe use VB6 database engine "also can read and write, but I wouldn't use),

CodePudding user response:

I didn't see the right answer, only oneself STH over and over again
  • Related