Home > Net >  Vb.net reading EXCEL trend line formula problem
Vb.net reading EXCEL trend line formula problem

Time:11-22

Using VB to read EXCEK trend line formula is always lagging behind
Show the "formula" button vb,.net program

Private Sub Button2_Click (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles Button2. Click
Try
Dim gs1 As String
Me. Range (" B49 "). The Value="https://bbs.csdn.net/topics/C1:"
gs1=Me. Chart_2. SeriesCollection (1). The Trendlines (1) DataLabel. Text
If gs1="" Then
The Exit Sub
End the If
Dim gs1_2 () As String
Gs1_2=gs1. Split ("=") 3
'If Val (gs1_2 (2)) & lt;=0.995 Then
Chart_2. SeriesCollection (1). The Trendlines (1).
type=3 Chart_2. SeriesCollection (1). The Trendlines (1) the Order=4
End the If
gs1=Me. Chart_2. SeriesCollection (1). The Trendlines (1) DataLabel. Text
Me. Range (" B49 "). The Value="https://bbs.csdn.net/topics/C1:" & amp; Gs1
Catch the ex As Exception
MsgBox (ex. ToString)
End the Try
End Sub
The End of the Class
Gs1 is read in the trend line of text (note that the color)
After the change trend parameter Order=4
Reading a gs1 can reflect as follows,

Into the EXCLE never according to the "formula" button: figure 1

Press 1 time "formula" button: figure 2 figure appeared under the most "C1: Y=... "Is shown in figure 1 the trend line formula of EXCEL, this formula has changed

Press 2 times "formula" button: "C1: Y=... "Is shown in figure 2 is consistent
,
Obvious. DataLabel. Text lag, how to solve for a delay
  • Related