Open Random Access File and Populate Worksheet

  • Tình trạng: Closed
  • Giải thưởng: $60
  • Các bài thi đã nhận: 2
  • Người chiến thắng: MuradMurad

Tóm tắt cuộc thi

I need to open the attached random access file RawMats.dat in a MS Excel worksheet.
I will then modify some data add some new records/rows and save it back to the original file.
The winner will have the clearest and most understandable commented code.

INFO YOU NEED FOR THE PROJECT:
(If you do not want others to see your entry upload it elsewhere and send me a private message - I do not want to seal this contest)

The Random Access fields of the RawMats.dat file and program flow.....

Type FileRawMaterials in .BAS module (**see below)

THEN IN FORM (FRM) DECLARATIONS IT IS DECLARED AS:
Dim RM As FileRawMaterials

Open "RawMats.dat" For Random As #22 Len = 5120

For i = 1 To LastRecord ' (there are currently 625 records)

RecNo = i

Get #22, RecNo, RM 'Get the random file

POPULATE AN EXCEL SHEET WITH EACH RECORD ON A ROW AND EACH FIELD IN A CELL

Next i 'next RecNo

Close #22

'// Make some changes if required e.g. RM-Code = "5-ABCD1234" (a new code)
'// Put #22, RecNo ' Save changes




'======================================
'**Raw Materials File 'Length 5120
'=====================================

Type FileRawMaterials'
Rec As String * 6 ' Record Or RecNo.
PicFile As String * 8
RemarksFile As String * 8
UniqueRef As String * 16
DBaseAroma As Integer
DBaseFlavour As Integer
DBaseProfessional As Integer
DBaseFree As Integer
DBasePW As Integer
DBaseFormats As Integer
DBaseUser As Integer
DBaseExp1 As Integer
DBaseExp2 As Integer
ArtPrice As Currency '8
DcCode As Integer '2
Artical As String * 50
Reference As String * 20
Order As String * 1
Class(27) As Integer
CLass2 As String * 4
Classification As String * 25
BriefDescription As String * 50
ClassFunction As String * 25
ClassVap As Single
Syn As String * 1050
Odour As String * 1050
Impact As Single
ClassHr As Single
Therapy As String * 1050
Perfume(21) As Integer
Flavour(21) As Integer
RemarkFra(21) As String * 15
RemarkFla(21) As String * 15
T_N As String * 4
Hour As Single
Heat As String * 40
DisColour As String * 40
pHMin As Single
pHMax As Single
DoseFlaMax As Single
DoseFlaMin As Single
ClassFla As Single
ClassFra As Single
DoseFraMax As Single
DoseFraMin As Single
State As String * 80
CHO(6) As Integer
MolFormula As String * 24
MW As Single
SG As Single
SGMax As Single
RI As Single
RIMax As Single
Rotat As Single
RotatMax As Single
FP As Single
FPMax As Single
MP As Single
MPMax As Single
BP As Single
BPMax As Single
SolWater As Single
SolEtOH As Single
SolPG As Single
SolFixOil As Single
SolDPG As Single
SolBB As Single
SolBA As Single
SolDEP As Single
CasNo As String * 30
Tarif As String * 7
NaTid As String * 16
IFRA As String * 10
RIFM As String * 1
CoE As String * 5
EEC As String * 1
FDA As String * 7
FEMA As String * 4
FCC As String * 1
SafetyFlagEx1 As String * 1
SafetyFlagEx2 As String * 1
SafetyFlagEx3 As String * 1
Safty As String * 200
RtPolar1 As Single
RtPolar2 As Single
RtPolar3 As Single
RtPolar4 As Single
RtNonPolar1 As Single
RtNonPolar2 As Single
RtNonPolar3 As Single
RtNonPolar4 As Single
Ms1 As Integer
Ms2 As Integer
Ms3 As Integer
Ms4 As Integer
Ms5 As Integer
Refer As String * 120
GNotes As String * 120
CreatedNow As Double
PWPrice As Currency
Spare As String * 8 '(Can also use as Currency)
End Type

Các kĩ năng yêu cầu

Phản hồi của người thuê

“Great job - very quick - modified code without a grumble - knows his stuff”

Hình ảnh hồ sơ perfumervw, Thailand.

Bảng thông báo công khai

  • edatawiz
    edatawiz
    • cách đây 9 năm

    Hello are you really trying to run this as project for your official use as this would make your work so complicated ... if project is what you would want to run .. this can be done with access or any other database rather using a random file .. Let me know your views

    • cách đây 9 năm
    1. perfumervw
      Chủ cuộc thi
      • cách đây 9 năm

      Its built into the history of the project so has to be like this, sorry.

      • cách đây 9 năm
  • lgdelrosario
    lgdelrosario
    • cách đây 9 năm

    My entry :) http://juancoder.com/demo/RAF.zip

    • cách đây 9 năm
  • edatawiz
    edatawiz
    • cách đây 9 năm

    Hello -

    • cách đây 9 năm
  • edatawiz
    edatawiz
    • cách đây 9 năm

    Hello -

    • cách đây 9 năm

Xem thêm bình luận

Làm thế nào để bắt đầu với cuộc thi

  • Đăng cuộc thi của bạn

    Đăng cuộc thi của bạn Nhanh chóng và dễ dàng

  • Nhận được vô số bài dự thi

    Nhận được vô số Bài dự thi Từ khắp nơi trên thế giới

  • Trao giải cho bài thi xuất sắc nhất

    Trao giải cho bài thi xuất sắc nhất Download File - Đơn giản!

Đăng cuộc thi ngay hoặc tham gia với chúng tôi ngay hôm nay!